├── .classpath ├── .gitattributes ├── .project ├── .settings ├── .jsdtscope ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.core.prefs ├── org.eclipse.m2e.core.prefs ├── org.eclipse.wst.common.component ├── org.eclipse.wst.common.project.facet.core.xml ├── org.eclipse.wst.jsdt.ui.superType.container ├── org.eclipse.wst.jsdt.ui.superType.name └── org.eclipse.wst.validation.prefs ├── .springBeans ├── README.md ├── pom.xml ├── sql └── table.sql ├── src ├── main │ ├── java │ │ └── com │ │ │ └── xiaoniu │ │ │ ├── Interceptor │ │ │ └── LoginInterceptor.java │ │ │ ├── controller │ │ │ ├── APICaseNewController.java │ │ │ ├── APIController.java │ │ │ ├── CaseSetALLController.java │ │ │ ├── CaseSetController.java │ │ │ ├── EnvVarController.java │ │ │ ├── FileController.java │ │ │ ├── HomeController.java │ │ │ ├── HttpClientController.java │ │ │ ├── TestNGtestController.java │ │ │ ├── UserController.java │ │ │ └── constructDataAPI.java │ │ │ ├── httpclient │ │ │ ├── ClearConnectionsHandler.java │ │ │ ├── HttpClientOperate.java │ │ │ └── HttpResult.java │ │ │ ├── mapper │ │ │ ├── APICaseNewMapper.java │ │ │ ├── APICaseRelationMapper.java │ │ │ ├── APIMapper.java │ │ │ ├── APIResultMapper.java │ │ │ ├── CaseResultMapper.java │ │ │ ├── CaseSetMapper.java │ │ │ ├── EnvInfoMapper.java │ │ │ ├── EnvVarMapper.java │ │ │ ├── TempVarMapper.java │ │ │ └── UserMapper.java │ │ │ ├── model │ │ │ ├── APICaseModel.java │ │ │ ├── APICaseNew.java │ │ │ ├── APICaseRelation.java │ │ │ ├── APIModel.java │ │ │ ├── AssertModel.java │ │ │ ├── AuditLoanModel.java │ │ │ ├── CaseResultModel.java │ │ │ ├── CaseSetModel.java │ │ │ ├── CaseSetResultModel.java │ │ │ ├── CommonDictModel.java │ │ │ ├── EnvInfoModel.java │ │ │ ├── EnvVarModel.java │ │ │ ├── LoanDetailModel.java │ │ │ ├── MessageResult.java │ │ │ ├── ParamModel.java │ │ │ ├── Pie_Data.java │ │ │ ├── ResponseDetailModel.java │ │ │ ├── Result.java │ │ │ ├── ResultData.java │ │ │ ├── UserModel.java │ │ │ ├── accountBookModel.java │ │ │ ├── certInfoModel.java │ │ │ ├── loanDataModel.java │ │ │ ├── loanResult.java │ │ │ ├── mortgageModel.java │ │ │ ├── test_details.java │ │ │ └── undueLoanInfoModel.java │ │ │ ├── service │ │ │ ├── APICaseNewService.java │ │ │ ├── APICaseRelationService.java │ │ │ ├── APIResultService.java │ │ │ ├── APIService.java │ │ │ ├── CaseResultService.java │ │ │ ├── CaseSetService.java │ │ │ ├── EnvInfoService.java │ │ │ ├── EnvVarService.java │ │ │ ├── HandleService.java │ │ │ ├── HttpClientService.java │ │ │ ├── SyncService.java │ │ │ ├── TelnetService.java │ │ │ ├── TempVarService.java │ │ │ ├── UserService.java │ │ │ └── construcatDataService.java │ │ │ ├── serviceImp │ │ │ ├── APICaseNewServiceImp.java │ │ │ ├── APICaseRelationServiceImp.java │ │ │ ├── APIResultServiceImp.java │ │ │ ├── APIServiceImp.java │ │ │ ├── CaseResultServiceImp.java │ │ │ ├── CaseSetServiceImp.java │ │ │ ├── EnvInfoServiceImp.java │ │ │ ├── EnvVarServiceImp.java │ │ │ ├── HandleServiceImp.java │ │ │ ├── HttpClientServiceImp.java │ │ │ ├── SyncServiceImp.java │ │ │ ├── TelnetServiceImp.java │ │ │ ├── TempVarServiceImp.java │ │ │ ├── UserServiceImp.java │ │ │ └── construcatDataServiceImp.java │ │ │ └── tools │ │ │ ├── Constant.java │ │ │ ├── DateFormat.java │ │ │ ├── Generator │ │ │ ├── BankCardNumberGenerator.java │ │ │ ├── ChineseAddressGenerator.java │ │ │ ├── ChineseAreaList.java │ │ │ ├── ChineseCharUtils.java │ │ │ ├── ChineseIDCardNumberGenerator.java │ │ │ ├── ChineseMobileNumberGenerator.java │ │ │ ├── EmailAddressGenerator.java │ │ │ ├── GenerateIdCard.java │ │ │ ├── GenericGenerator.java │ │ │ ├── IdcardInfoExtractor.java │ │ │ └── RandomUtil.java │ │ │ ├── HttpsUtils.java │ │ │ ├── JsonFormatTool.java │ │ │ ├── RecordIP.java │ │ │ ├── RegexUtils.java │ │ │ ├── ResponseData.java │ │ │ └── listener │ │ │ ├── AllTestSetResultListener.java │ │ │ ├── ExtentTestNGIReporterListener.java │ │ │ ├── NewTestResultStorageListener.java │ │ │ ├── NewTestSetResultListener.java │ │ │ ├── ReportUtil.java │ │ │ ├── SpringContextUtils.java │ │ │ ├── StringUtil.java │ │ │ ├── TestResultStorageListener.java │ │ │ └── TestSetResultListener.java │ ├── resources │ │ ├── config.properties │ │ ├── jdbc.properties │ │ ├── logback.xml │ │ ├── mapper │ │ │ ├── API │ │ │ │ ├── APICaseMapper.xml │ │ │ │ ├── APICaseNewMapper.xml │ │ │ │ ├── APICaseRelationMapper.xml │ │ │ │ ├── APIMapper.xml │ │ │ │ ├── APIResultMapper.xml │ │ │ │ ├── CaseResultMapper.xml │ │ │ │ └── CaseSetMapper.xml │ │ │ ├── Env │ │ │ │ ├── EnvInfoMapper.xml │ │ │ │ ├── EnvVarMapper.xml │ │ │ │ └── TempVarMapper.xml │ │ │ └── User │ │ │ │ └── UserMapper.xml │ │ ├── mybatis-config.xml │ │ ├── spring │ │ │ ├── spring-dao.xml │ │ │ ├── spring-httpclient.xml │ │ │ ├── spring-service.xml │ │ │ └── spring-web.xml │ │ └── testng.xml │ └── webapp │ │ ├── WEB-INF │ │ ├── jsp │ │ │ ├── API │ │ │ │ ├── addAPI.jsp │ │ │ │ ├── editAPI.jsp │ │ │ │ ├── list.jsp │ │ │ │ └── result.jsp │ │ │ ├── Case │ │ │ │ ├── addCase.jsp │ │ │ │ ├── editCase.jsp │ │ │ │ ├── list.jsp │ │ │ │ └── resultCase.jsp │ │ │ ├── CaseNew │ │ │ │ ├── addCaseNew.jsp │ │ │ │ ├── editCaseNew.jsp │ │ │ │ ├── list.jsp │ │ │ │ └── resultCaseNew.jsp │ │ │ ├── CaseSet │ │ │ │ ├── addSet.jsp │ │ │ │ ├── editSet.jsp │ │ │ │ ├── list.jsp │ │ │ │ ├── recentReport.jsp │ │ │ │ └── resultSet.jsp │ │ │ ├── Env │ │ │ │ ├── addVar.jsp │ │ │ │ ├── editVar.jsp │ │ │ │ └── list.jsp │ │ │ ├── User │ │ │ │ ├── editUser.jsp │ │ │ │ ├── list.jsp │ │ │ │ ├── login.jsp │ │ │ │ └── register.jsp │ │ │ ├── err.jsp │ │ │ ├── home.jsp │ │ │ ├── taglibs.jsp │ │ │ └── upload.jsp │ │ ├── lib │ │ │ ├── bravo-core.jar │ │ │ └── xnol-loan.jar │ │ └── web.xml │ │ ├── bootstrap │ │ ├── 3.2.0 │ │ │ ├── css │ │ │ │ ├── bootstrap-datepicker3.min.css │ │ │ │ ├── bootstrap-select.css │ │ │ │ ├── bootstrap-switch.css │ │ │ │ ├── bootstrap-switch.min.css │ │ │ │ ├── bootstrap-theme.css │ │ │ │ ├── bootstrap-theme.css.map │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ └── bootstrap.min.css │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ │ └── js │ │ │ │ ├── bootstrap-datepicker.js │ │ │ │ ├── bootstrap-datepicker.min.js │ │ │ │ ├── bootstrap-datepicker.zh-CN.min.js │ │ │ │ ├── bootstrap-select.js │ │ │ │ ├── bootstrap-switch.js │ │ │ │ ├── bootstrap-switch.min.js │ │ │ │ ├── bootstrap.js │ │ │ │ └── bootstrap.min.js │ │ ├── 3.3.7 │ │ │ ├── css │ │ │ │ ├── bootstrap-datepicker3.min.css │ │ │ │ ├── bootstrap-select.css │ │ │ │ ├── bootstrap-switch.css │ │ │ │ ├── bootstrap-switch.min.css │ │ │ │ ├── bootstrap-theme.css │ │ │ │ ├── bootstrap-theme.css.map │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap-theme.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── js │ │ │ │ ├── bootstrap-datepicker.js │ │ │ │ ├── bootstrap-datepicker.min.js │ │ │ │ ├── bootstrap-datepicker.zh-CN.min.js │ │ │ │ ├── bootstrap-paginator.js │ │ │ │ ├── bootstrap-select.js │ │ │ │ ├── bootstrap-switch.js │ │ │ │ ├── bootstrap-switch.min.js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── npm.js │ │ └── ReadMe.txt │ │ ├── css │ │ ├── home.css │ │ ├── mail │ │ │ ├── insert.css │ │ │ └── table.css │ │ ├── mainframe.css │ │ ├── public.css │ │ ├── table-td.css │ │ └── user │ │ │ ├── login.css │ │ │ ├── register.css │ │ │ └── style.css │ │ ├── echarts-2.2.7 │ │ ├── .DS_Store │ │ ├── chart │ │ │ ├── bar.js │ │ │ ├── chord.js │ │ │ ├── eventRiver.js │ │ │ ├── force.js │ │ │ ├── funnel.js │ │ │ ├── gauge.js │ │ │ ├── heatmap.js │ │ │ ├── k.js │ │ │ ├── line.js │ │ │ ├── map.js │ │ │ ├── pie.js │ │ │ ├── radar.js │ │ │ ├── scatter.js │ │ │ ├── tree.js │ │ │ ├── treemap.js │ │ │ ├── venn.js │ │ │ └── wordCloud.js │ │ ├── echarts-all.js │ │ └── echarts.js │ │ ├── html │ │ └── welcome.html │ │ ├── image │ │ ├── API.jpg │ │ ├── blue.jpg │ │ ├── platform │ │ │ ├── 1.png │ │ │ ├── 10.png │ │ │ ├── 11.png │ │ │ ├── 12.png │ │ │ ├── 13.png │ │ │ ├── 14.png │ │ │ ├── 15.png │ │ │ ├── 16.png │ │ │ ├── 17.png │ │ │ ├── 18.png │ │ │ ├── 19.png │ │ │ ├── 2.png │ │ │ ├── 20.png │ │ │ ├── 3.png │ │ │ ├── 4.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── 8.png │ │ │ └── 9.png │ │ └── user │ │ │ ├── login-img.png │ │ │ └── login_logo.png │ │ ├── index.jsp │ │ ├── jQuery │ │ ├── 2.1.1 │ │ │ ├── jquery.js │ │ │ └── jquery.min.js │ │ ├── 2.1.4 │ │ │ ├── jquery.js │ │ │ └── jquery.min.js │ │ ├── jquery-ui-1.10.3.custom.js │ │ ├── jquery.i18n.properties-1.0.9.js │ │ └── jquery.validate.js │ │ ├── js │ │ ├── api │ │ │ ├── APIlist.js │ │ │ ├── apiRelations.js │ │ │ ├── pie.js │ │ │ ├── table.js │ │ │ └── tbody.js │ │ ├── common.js │ │ ├── fastLiveFilter.js │ │ ├── highlight.js │ │ ├── main.js │ │ ├── template-native.js │ │ └── user │ │ │ ├── page_login.js │ │ │ └── page_regist.js │ │ └── vendor │ │ ├── bootstrap-social │ │ ├── bootstrap-social.css │ │ ├── bootstrap-social.less │ │ └── bootstrap-social.scss │ │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ │ ├── bootstrap.js │ │ │ └── bootstrap.min.js │ │ ├── data │ │ ├── flot-data.js │ │ └── morris-data.js │ │ ├── datatables-plugins │ │ ├── dataTables.bootstrap.css │ │ ├── dataTables.bootstrap.js │ │ ├── dataTables.bootstrap.min.js │ │ └── index.html │ │ ├── datatables-responsive │ │ ├── dataTables.responsive.css │ │ ├── dataTables.responsive.js │ │ └── dataTables.responsive.scss │ │ ├── datatables │ │ ├── css │ │ │ ├── dataTables.bootstrap.css │ │ │ ├── dataTables.bootstrap.min.css │ │ │ ├── dataTables.bootstrap4.css │ │ │ ├── dataTables.bootstrap4.min.css │ │ │ ├── dataTables.foundation.css │ │ │ ├── dataTables.foundation.min.css │ │ │ ├── dataTables.jqueryui.css │ │ │ ├── dataTables.jqueryui.min.css │ │ │ ├── dataTables.material.css │ │ │ ├── dataTables.material.min.css │ │ │ ├── dataTables.semanticui.css │ │ │ ├── dataTables.semanticui.min.css │ │ │ ├── dataTables.uikit.css │ │ │ ├── dataTables.uikit.min.css │ │ │ ├── jquery.dataTables.css │ │ │ ├── jquery.dataTables.min.css │ │ │ └── jquery.dataTables_themeroller.css │ │ ├── images │ │ │ ├── Sorting icons.psd │ │ │ ├── favicon.ico │ │ │ ├── sort_asc.png │ │ │ ├── sort_asc_disabled.png │ │ │ ├── sort_both.png │ │ │ ├── sort_desc.png │ │ │ └── sort_desc_disabled.png │ │ └── js │ │ │ ├── dataTables.bootstrap.js │ │ │ ├── dataTables.bootstrap.min.js │ │ │ ├── dataTables.bootstrap4.js │ │ │ ├── dataTables.bootstrap4.min.js │ │ │ ├── dataTables.foundation.js │ │ │ ├── dataTables.foundation.min.js │ │ │ ├── dataTables.jqueryui.js │ │ │ ├── dataTables.jqueryui.min.js │ │ │ ├── dataTables.material.js │ │ │ ├── dataTables.material.min.js │ │ │ ├── dataTables.semanticui.js │ │ │ ├── dataTables.semanticui.min.js │ │ │ ├── dataTables.uikit.js │ │ │ ├── dataTables.uikit.min.js │ │ │ ├── jquery.dataTables.js │ │ │ ├── jquery.dataTables.min.js │ │ │ └── jquery.js │ │ ├── dist │ │ ├── css │ │ │ ├── sb-admin-2.css │ │ │ └── sb-admin-2.min.css │ │ └── js │ │ │ ├── sb-admin-2.js │ │ │ └── sb-admin-2.min.js │ │ ├── flot-tooltip │ │ ├── jquery.flot.tooltip.js │ │ ├── jquery.flot.tooltip.min.js │ │ └── jquery.flot.tooltip.source.js │ │ ├── flot │ │ ├── excanvas.js │ │ ├── excanvas.min.js │ │ ├── jquery.colorhelpers.js │ │ ├── jquery.flot.canvas.js │ │ ├── jquery.flot.categories.js │ │ ├── jquery.flot.crosshair.js │ │ ├── jquery.flot.errorbars.js │ │ ├── jquery.flot.fillbetween.js │ │ ├── jquery.flot.image.js │ │ ├── jquery.flot.js │ │ ├── jquery.flot.navigate.js │ │ ├── jquery.flot.pie.js │ │ ├── jquery.flot.resize.js │ │ ├── jquery.flot.selection.js │ │ ├── jquery.flot.stack.js │ │ ├── jquery.flot.symbol.js │ │ ├── jquery.flot.threshold.js │ │ ├── jquery.flot.time.js │ │ └── jquery.js │ │ ├── font-awesome │ │ ├── css │ │ │ ├── font-awesome.css │ │ │ ├── font-awesome.css.map │ │ │ └── font-awesome.min.css │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── less │ │ │ ├── animated.less │ │ │ ├── bordered-pulled.less │ │ │ ├── core.less │ │ │ ├── extras.less │ │ │ ├── fixed-width.less │ │ │ ├── font-awesome.less │ │ │ ├── icons.less │ │ │ ├── larger.less │ │ │ ├── list.less │ │ │ ├── mixins.less │ │ │ ├── path.less │ │ │ ├── rotated-flipped.less │ │ │ ├── screen-reader.less │ │ │ ├── spinning.less │ │ │ ├── stacked.less │ │ │ └── variables.less │ │ └── scss │ │ │ ├── _animated.scss │ │ │ ├── _bordered-pulled.scss │ │ │ ├── _core.scss │ │ │ ├── _extras.scss │ │ │ ├── _fixed-width.scss │ │ │ ├── _icons.scss │ │ │ ├── _larger.scss │ │ │ ├── _list.scss │ │ │ ├── _mixins.scss │ │ │ ├── _path.scss │ │ │ ├── _rotated-flipped.scss │ │ │ ├── _screen-reader.scss │ │ │ ├── _spinning.scss │ │ │ ├── _stacked.scss │ │ │ ├── _variables.scss │ │ │ └── font-awesome.scss │ │ ├── jquery │ │ ├── jquery.js │ │ └── jquery.min.js │ │ ├── js │ │ └── sb-admin-2.js │ │ ├── less │ │ ├── mixins.less │ │ ├── sb-admin-2.less │ │ └── variables.less │ │ ├── metisMenu │ │ ├── metisMenu.css │ │ ├── metisMenu.js │ │ ├── metisMenu.min.css │ │ └── metisMenu.min.js │ │ ├── morrisjs │ │ ├── morris.css │ │ ├── morris.js │ │ └── morris.min.js │ │ └── raphael │ │ ├── raphael.js │ │ └── raphael.min.js └── test │ └── java │ └── test │ ├── Queue_rec.java │ └── testngDao.java └── target └── m2e-wtp └── web-resources └── META-INF ├── MANIFEST.MF └── maven └── com.xiaoniu └── APIPlatform ├── pom.properties └── pom.xml /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=java 2 | *.css linguist-language=java 3 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | APIPlatform 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.jsdt.core.javascriptValidator 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.common.project.facet.core.builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | org.springframework.ide.eclipse.core.springbuilder 35 | 36 | 37 | 38 | 39 | 40 | org.springframework.ide.eclipse.core.springnature 41 | org.eclipse.jem.workbench.JavaEMFNature 42 | org.eclipse.wst.common.modulecore.ModuleCoreNature 43 | org.eclipse.jdt.core.javanature 44 | org.eclipse.m2e.core.maven2Nature 45 | org.eclipse.wst.common.project.facet.core.nature 46 | org.eclipse.wst.jsdt.core.jsNature 47 | 48 | 49 | -------------------------------------------------------------------------------- /.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/webapp/WEB-INF/jsp/taglibs.jsp=UTF-8 4 | encoding//src/test/java=UTF-8 5 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 8 | org.eclipse.jdt.core.compiler.source=1.8 9 | -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /.springBeans: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | src/main/resources/spring/spring-service.xml 13 | src/main/resources/spring/spring-dao.xml 14 | src/main/resources/spring/spring-web.xml 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/Interceptor/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.Interceptor; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.springframework.web.servlet.HandlerInterceptor; 8 | import org.springframework.web.servlet.ModelAndView; 9 | 10 | 11 | /** 12 | * 未登陆之前进行拦截 13 | * */ 14 | public class LoginInterceptor implements HandlerInterceptor { 15 | 16 | //进入 Handler方法之前执行 17 | //用于身份认证、身份授权 18 | //比如身份认证,如果认证通过表示当前用户没有登陆,需要此方法拦截不再向下执行 19 | public boolean preHandle(HttpServletRequest request, 20 | HttpServletResponse response, Object handler) throws Exception { 21 | 22 | //获取请求的url 23 | String url = request.getRequestURI(); 24 | //判断url是否是公开 地址(实际使用时将公开 地址配置配置文件中) 25 | //这里公开地址是登陆提交的地址 26 | if(url.indexOf("loginAction")>=0 || url.indexOf("register")>=0){ 27 | //如果进行登陆提交,放行 28 | return true; 29 | } 30 | 31 | //判断session 32 | HttpSession session = request.getSession(); 33 | //从session中取出用户身份信息 34 | String LoginuserName = (String) session.getAttribute("LoginuserName"); 35 | 36 | if(LoginuserName != null){ 37 | //身份存在,放行 38 | return true; 39 | } 40 | 41 | //执行这里表示用户身份需要认证,跳转登陆页面 42 | request.getRequestDispatcher("/WEB-INF/jsp/User/login.jsp").forward(request, response); 43 | 44 | //return false表示拦截,不向下执行 45 | //return true表示放行 46 | return false; 47 | } 48 | 49 | //进入Handler方法之后,返回modelAndView之前执行 50 | //应用场景从modelAndView出发:将公用的模型数据(比如菜单导航)在这里传到视图,也可以在这里统一指定视图 51 | public void postHandle(HttpServletRequest request, 52 | HttpServletResponse response, Object handler, 53 | ModelAndView modelAndView) throws Exception { 54 | 55 | System.out.println("LoginInterceptor...postHandle"); 56 | 57 | } 58 | 59 | //执行Handler完成执行此方法 60 | //应用场景:统一异常处理,统一日志处理 61 | public void afterCompletion(HttpServletRequest request, 62 | HttpServletResponse response, Object handler, Exception ex) 63 | throws Exception { 64 | 65 | System.out.println("LoginInterceptor...afterCompletion"); 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/controller/HomeController.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.controller; 2 | 3 | import java.io.IOException; 4 | import java.util.List; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | 8 | import org.apache.http.client.ClientProtocolException; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.stereotype.Controller; 13 | import org.springframework.ui.Model; 14 | import org.springframework.web.bind.annotation.RequestMapping; 15 | 16 | import com.xiaoniu.model.EnvInfoModel; 17 | import com.xiaoniu.service.EnvInfoService; 18 | import com.xiaoniu.tools.RecordIP; 19 | 20 | @Controller 21 | public class HomeController { 22 | 23 | private Logger log = LoggerFactory.getLogger(HomeController.class); 24 | 25 | @Autowired 26 | private EnvInfoService envInfoService; 27 | 28 | @RequestMapping(value="/home") 29 | public String home(HttpServletRequest request,Model model) throws ClientProtocolException, IOException{ 30 | String ip=RecordIP.getIpAddress(request); 31 | log.info("访问用户 IP:"+ip); 32 | 33 | List EnvList= envInfoService.getEnvALLTitle(); 34 | model.addAttribute("EnvList", EnvList); 35 | return "home"; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/controller/HttpClientController.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.controller; 2 | 3 | import java.io.IOException; 4 | import org.apache.http.client.ClientProtocolException; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.ui.Model; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import com.xiaoniu.httpclient.HttpClientOperate; 10 | import com.xiaoniu.httpclient.HttpResult; 11 | 12 | 13 | 14 | @Controller 15 | public class HttpClientController { 16 | 17 | @Autowired 18 | private HttpClientOperate httpClientOperate; 19 | 20 | // @Autowired 21 | // private HttpClientService http; 22 | 23 | @RequestMapping("/HttpClient") 24 | public String HttpTest(Model model){ 25 | String response=null; 26 | try { 27 | HttpResult result=httpClientOperate.doGet("https://www.xiaoniu88.com"); 28 | response=result.getContent(); 29 | model.addAttribute("message",response); 30 | } catch (ClientProtocolException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } catch (IOException e) { 34 | // TODO Auto-generated catch block 35 | e.printStackTrace(); 36 | } 37 | return "err"; 38 | } 39 | 40 | // @RequestMapping("/Http") 41 | // public String Http(Model model){ 42 | // String URL="https://www.xiaoniu88.com"; 43 | // String response=null; 44 | // HttpResult result=http.doSend("18环境", "get", URL, null); 45 | // response=result.getContent(); 46 | // model.addAttribute("message",response); 47 | // 48 | // return "err"; 49 | // } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/controller/TestNGtestController.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.controller; 2 | 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.testng.TestNG; 9 | 10 | 11 | 12 | @Controller 13 | public class TestNGtestController { 14 | 15 | 16 | @RequestMapping("/testng") 17 | public String testng(){ 18 | return "testng"; 19 | } 20 | 21 | @RequestMapping("/testng/run") 22 | public String runtestng(){ 23 | String path=Thread.currentThread().getContextClassLoader().getResource("").toString(); 24 | System.out.println(path); 25 | String tesngxml_path=path+"testng.xml"; 26 | 27 | TestNG testng = new TestNG(); 28 | List testFilesList = new ArrayList(); 29 | testFilesList.add(tesngxml_path); 30 | testng.setTestSuites(testFilesList); 31 | //设置output目录 32 | // String outputdir=System.getProperty("user.dir")+"/test-output" ; 33 | // File outputdir=new File("."); 34 | // testng.setOutputDirectory(outputdir.getAbsolutePath()); 35 | //设置监听 36 | // List> classes=new ArrayList>(); 37 | // classes.add(ExtentTestNGIReporterListener.class); 38 | // testng.setListenerClasses(classes); 39 | testng.run(); 40 | return "redirect:/case/list"; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/httpclient/ClearConnectionsHandler.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.httpclient; 2 | 3 | import org.apache.http.conn.HttpClientConnectionManager; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.scheduling.annotation.Scheduled; 7 | 8 | 9 | /** 10 | * 自定义定时清理无效链接(httpclient) 11 | */ 12 | public class ClearConnectionsHandler extends Thread{ 13 | private Logger logger =LoggerFactory.getLogger(ClearConnectionsHandler.class); 14 | 15 | private final HttpClientConnectionManager connMgr; 16 | 17 | private volatile boolean shutdown; 18 | 19 | public ClearConnectionsHandler(HttpClientConnectionManager connMgr) { 20 | this.connMgr = connMgr; 21 | this.start(); 22 | } 23 | 24 | @Override 25 | public void run() { 26 | try { 27 | while (!shutdown) { 28 | synchronized (this) { 29 | logger.info("清理无效链接"); 30 | wait(5000); 31 | // 关闭失效的连接 32 | connMgr.closeExpiredConnections(); 33 | } 34 | } 35 | } catch (InterruptedException ex) { 36 | // 结束 37 | } 38 | } 39 | 40 | /** 41 | * CRON表达式 含义 42 | "0/20 * * * * ?" 20秒执行一次 43 | "0 0 0/1 * * ? *" 1小时执行一次 44 | "0 0 12 * * ?" 每天中午十二点触发 45 | "0 15 10 ? * *" 每天早上10:15触发 46 | "0 15 10 * * ?" 每天早上10:15触发 47 | "0 15 10 * * ? *" 每天早上10:15触发 48 | "0 15 10 * * ? 2005" 2005年的每天早上10:15触发 49 | "0 * 14 * * ?" 每天从下午2点开始到2点59分每分钟一次触发 50 | "0 0/5 14 * * ?" 每天从下午2点开始到2:55分结束每5分钟一次触发 51 | "0 0/5 14,18 * * ?" 每天的下午2点至2:55和6点至6点55分两个时间段内每5分钟一次触发 52 | "0 0-5 14 * * ?" 每天14:00至14:05每分钟一次触发 53 | "0 10,44 14 ? 3 WED" 三月的每周三的14:10和14:44触发 54 | "0 15 10 ? * MON-FRI" 每个周一、周二、周三、周四、周五的10:15触发 55 | */ 56 | @Scheduled(cron = "0/60 * * * * ?") 57 | public void shutdown() { 58 | shutdown = true; 59 | synchronized (this) { 60 | notifyAll(); 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/httpclient/HttpResult.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.httpclient; 2 | 3 | import java.io.Serializable; 4 | 5 | public class HttpResult implements Serializable { 6 | 7 | private static final long serialVersionUID = 1L; 8 | 9 | /** 10 | * 状体码 11 | */ 12 | private Integer statusCode; 13 | 14 | /** 15 | * 响应内容 16 | */ 17 | private String content; 18 | 19 | /** 20 | * 开始时间 21 | * */ 22 | private long beginTime; 23 | /** 24 | * 结束时间 25 | * */ 26 | private long endTime; 27 | 28 | 29 | public HttpResult(){ 30 | 31 | } 32 | 33 | public HttpResult(Integer statusCode, String content) { 34 | this.statusCode = statusCode; 35 | this.content = content; 36 | } 37 | 38 | /** 39 | * 获取状体码 40 | * @return 状体码 41 | */ 42 | public Integer getStatusCode() { 43 | return statusCode; 44 | } 45 | 46 | 47 | /** 48 | * 设置状体码 49 | * @param statusCode 状体码 50 | */ 51 | public void setStatusCode(Integer statusCode) { 52 | this.statusCode = statusCode; 53 | } 54 | 55 | 56 | /** 57 | * 获取响应内容 58 | * @return 响应内容 59 | */ 60 | public String getContent() { 61 | return content; 62 | } 63 | 64 | 65 | /** 66 | * 设置响应内容 67 | * @param content 响应内容 68 | */ 69 | public void setContent(String content) { 70 | this.content = content; 71 | } 72 | 73 | public long getBeginTime() { 74 | return beginTime; 75 | } 76 | 77 | public void setBeginTime(long beginTime) { 78 | this.beginTime = beginTime; 79 | } 80 | 81 | public long getEndTime() { 82 | return endTime; 83 | } 84 | 85 | public void setEndTime(long endTime) { 86 | this.endTime = endTime; 87 | } 88 | 89 | 90 | @Override 91 | public String toString() { 92 | return "HttpResult [statusCode=" + statusCode + ", content=" + content 93 | + ", beginTime=" + beginTime + ", endTime=" + endTime + "]"; 94 | } 95 | 96 | 97 | 98 | } 99 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/mapper/APICaseNewMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.mapper; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.xiaoniu.model.APICaseNew; 8 | 9 | public interface APICaseNewMapper { 10 | //获取待运行用例 11 | List getALLAPICaseNew(APICaseNew APIcaseNew); 12 | //获取单个测试用例 13 | APICaseNew getAPICaseNew(Integer id); 14 | 15 | //获取单个测试用例 16 | Integer getMaxCaseId(); 17 | //添加运行测试用例 18 | Integer addAPICaseNew(@Param("dependCaseId")Integer dependCaseId,@Param("caseName")String caseName,@Param("remark")String remark); 19 | //通过ID删除运行测试用例 20 | Integer delAPICaseNew(Integer id); 21 | //更新用例运行状态 22 | // Integer updateAPICaseIsRun(@Param("id")Integer id,@Param("isRun")Integer isRun); 23 | //更新用例 24 | Integer updateAPICaseNew(@Param("id")Integer id,@Param("dependCaseId")Integer dependCaseId,@Param("remark")String remark); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/mapper/APICaseRelationMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.mapper; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.xiaoniu.model.APICaseRelation; 8 | 9 | public interface APICaseRelationMapper { 10 | //通过用例ID获取用例下面所有接口 11 | List getAPICaseRelations(Integer caseId); 12 | //通过用例ID和接口ID获取接口 13 | APICaseRelation getAPIRelation(@Param("relationId")Integer relationId,@Param("caseId")Integer caseId,@Param("APIId")Integer APIId); 14 | //添加测试用例关联的接口 15 | Integer addAPICaseRelation(@Param("caseId")Integer caseId,@Param("APIId")Integer APIId,@Param("caseData")String caseData,@Param("caseAssert")String caseAssert,@Param("caseParam")String caseParam); 16 | 17 | //通过用例ID删除关联接口 18 | Integer delAPICaseRelation(Integer caseId); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/mapper/APIMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.mapper; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.xiaoniu.model.APIModel; 8 | 9 | public interface APIMapper { 10 | 11 | //获取测试用例 12 | List getALLAPI(APIModel APImodel); 13 | //通过ID获取测试用例 14 | APIModel getAPI(Integer id); 15 | //通过ID删除测试用例 16 | Integer delAPI(Integer id); 17 | //添加测试用例 18 | Integer addAPI(@Param("apiName")String apiName,@Param("apiHost")String apiHost,@Param("apiUrl")String apiUrl,@Param("apiMethod")String apiMethod,@Param("apiHeaders")String apiHeaders 19 | ,@Param("apiParams")String apiParams,@Param("apiStatus")Integer apiStatus,@Param("remark")String remark); 20 | //修改测试用例 21 | Integer updateAPI(@Param("id")Integer id,@Param("apiName")String apiName,@Param("apiHost")String apiHost,@Param("apiUrl")String apiUrl,@Param("apiMethod")String apiMethod,@Param("apiHeaders")String apiHeaders 22 | ,@Param("apiParams")String apiParams,@Param("apiStatus")Integer apiStatus,@Param("remark")String remark); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/mapper/APIResultMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.mapper; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.xiaoniu.model.CaseResultModel; 8 | 9 | public interface APIResultMapper { 10 | //查询运行接口结果 11 | List getAPIResult(Integer caseId); 12 | //通过用例集和用例ID获取接口结果 13 | List getAPIResultBySetId(@Param("caseId")Integer caseId,@Param("setId")Integer setId); 14 | //通过用例集和用例ID、批次号获取接口结果 15 | List getAPIResultBybatch(@Param("caseId")Integer caseId,@Param("setId")Integer setId,@Param("batch")long batch); 16 | //添加运行接口结果 17 | Integer addAPIResult(@Param("caseId")Integer caseId,@Param("APIId")Integer APIId,@Param("relationId")Integer relationId,@Param("setId")Integer setId,@Param("startTime")String startTime,@Param("endTime")String endTime,@Param("costTime")long costTime,@Param("request")String request,@Param("statusCode")Integer statusCode,@Param("response")String response,@Param("batch")long batch); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/mapper/CaseResultMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.mapper; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.xiaoniu.model.CaseResultModel; 8 | 9 | public interface CaseResultMapper { 10 | //查询最新运行测试用例结果 11 | CaseResultModel getCaseResult(Integer caseId); 12 | //通过批次号获取用例结果 13 | List getCaseResultByBatch(@Param("batch")long batch,@Param("resultStatus")String resultStatus); 14 | //添加运行测试用例结果 15 | Integer addCaseResult(@Param("caseId")Integer caseId,@Param("setId")Integer setId,@Param("startTime")String startTime,@Param("endTime")String endTime,@Param("costTime")long costTime,@Param("resultStatus")String resultStatus,@Param("runEnv")String runEnv,@Param("batch")long batch); 16 | //修改运行测试用例结果 17 | Integer updateCaseResult(@Param("caseId")Integer caseId,@Param("startTime")String startTime,@Param("endTime")String endTime,@Param("costTime")long costTime,@Param("resultStatus")String resultStatus); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/mapper/CaseSetMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.mapper; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.xiaoniu.model.CaseResultModel; 8 | import com.xiaoniu.model.CaseSetModel; 9 | import com.xiaoniu.model.CaseSetResultModel; 10 | 11 | public interface CaseSetMapper { 12 | //获取测试用例集 13 | List getAllSet(CaseSetModel caseSetModel); 14 | //通过ID获取用例集 15 | CaseSetModel getSet(Integer id); 16 | //通过ID删除用例集 17 | Integer delSet(Integer id); 18 | //新增用例集 19 | Integer addSet(@Param("caseSetName")String caseSetName,@Param("caseRelation")String caseRelation,@Param("caseCount")Integer caseCount,@Param("remark")String remark); 20 | //修改用例集 21 | Integer updateSet(@Param("id")Integer id,@Param("caseRelation")String caseRelation,@Param("caseCount")Integer caseCount,@Param("remark")String remark); 22 | //新增用例集结果 23 | Integer addSetResult(@Param("setId")Integer setId,@Param("startTime")String startTime,@Param("endTime")String endTime,@Param("costTime")long costTime,@Param("runEnv")String runEnv,@Param("batch")long batch); 24 | //获取最新用例集结果 25 | CaseSetResultModel getSetResult(Integer setId); 26 | //通过用例集ID获取用例结果 27 | List getSetCaseResult(@Param("setId")Integer setId,@Param("resultStatus")String resultStatus); 28 | //查询setId为-1,最近七次执行结果 29 | List getSetResultRent(Integer setId); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/mapper/EnvInfoMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.mapper; 2 | 3 | 4 | import java.util.List; 5 | 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import com.xiaoniu.model.EnvInfoModel; 9 | 10 | public interface EnvInfoMapper { 11 | Integer addEnv(@Param("envTitle")String envTitle,@Param("envDomain")String envDomain,@Param("envIp")String envIp); 12 | 13 | Integer delEnv(Integer id); 14 | 15 | EnvInfoModel getEnv(Integer id); 16 | 17 | EnvInfoModel getServer(EnvInfoModel envModel); 18 | 19 | List getAllEnv(EnvInfoModel envModel); 20 | 21 | List getEnvALLTitle(); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/mapper/EnvVarMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.mapper; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import com.xiaoniu.model.EnvVarModel; 6 | 7 | public interface EnvVarMapper { 8 | //添加变量 9 | Integer addVar(@Param("varName")String varName,@Param("varValue")String varValue,@Param("varType")Integer varType); 10 | //修改变量 11 | Integer updateVar(@Param("id")Integer id,@Param("varName")String varName,@Param("varValue")String varValue); 12 | //删除变量 13 | Integer delVar(@Param("id")Integer id); 14 | //获取全部变量 15 | List getAllVar(EnvVarModel envVarModel); 16 | //通过ID获取变量 17 | EnvVarModel getVar(Integer id); 18 | //通过变量名获取变量 19 | EnvVarModel getVarByName(String varName); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/mapper/TempVarMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.mapper; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | 5 | import com.xiaoniu.model.EnvVarModel; 6 | 7 | public interface TempVarMapper { 8 | //添加变量 9 | Integer addTempVar(@Param("varName")String varName,@Param("varRule")String varRule,@Param("varValue")String varValue); 10 | //通过变量名获取变量 11 | EnvVarModel getTempVarByName(String varName); 12 | //清空临时表 13 | void truncateVarTemp(); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.mapper; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import com.xiaoniu.model.UserModel; 8 | 9 | 10 | public interface UserMapper { 11 | UserModel checkUser(@Param("user")String user); 12 | 13 | UserModel findByUsername(@Param("user")String user,@Param("userPwd")String userPwd); 14 | 15 | Integer registerUser(@Param("user")String user,@Param("userPwd")String userPwd,@Param("userName")String userName,@Param("userIp")String userIp,@Param("email")String email ); 16 | 17 | List getAllUser(UserModel userModel); 18 | 19 | UserModel getUserById(Integer id); 20 | 21 | Integer delUser(Integer id); 22 | 23 | Integer UpdateUser(@Param("id")Integer id,@Param("userPwd")String userPwd,@Param("userName")String userName,@Param("email")String email); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/APICaseModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class APICaseModel implements Serializable{ 6 | 7 | private static final long serialVersionUID = -4071134482024648111L; 8 | 9 | private Integer id; 10 | private String caseData; 11 | private String caseName; 12 | private Integer APIId; 13 | private String caseAssert; 14 | private String caseParam; 15 | private String remark; 16 | private String createtime; 17 | private String updatetime; 18 | 19 | 20 | public String getCaseData() { 21 | return caseData; 22 | } 23 | public void setCaseData(String caseData) { 24 | this.caseData = caseData; 25 | } 26 | public String getRemark() { 27 | return remark; 28 | } 29 | public void setRemark(String remark) { 30 | this.remark = remark; 31 | } 32 | public String getCaseName() { 33 | return caseName; 34 | } 35 | public void setCaseName(String caseName) { 36 | this.caseName = caseName; 37 | } 38 | public String getCaseAssert() { 39 | return caseAssert; 40 | } 41 | public void setCaseAssert(String caseAssert) { 42 | this.caseAssert = caseAssert; 43 | } 44 | public String getCaseParam() { 45 | return caseParam; 46 | } 47 | public void setCaseParam(String caseParam) { 48 | this.caseParam = caseParam; 49 | } 50 | public Integer getId() { 51 | return id; 52 | } 53 | public void setId(Integer id) { 54 | this.id = id; 55 | } 56 | public Integer getAPIId() { 57 | return APIId; 58 | } 59 | public void setAPIId(Integer aPIId) { 60 | APIId = aPIId; 61 | } 62 | public String getCreatetime() { 63 | return createtime; 64 | } 65 | public void setCreatetime(String createtime) { 66 | this.createtime = createtime; 67 | } 68 | public String getUpdatetime() { 69 | return updatetime; 70 | } 71 | public void setUpdatetime(String updatetime) { 72 | this.updatetime = updatetime; 73 | } 74 | 75 | @Override 76 | public String toString() { 77 | return "APICaseModel [id=" + id + ", caseData=" + caseData 78 | + ", caseName=" + caseName + ", APIId=" + APIId 79 | + ", caseAssert=" + caseAssert + ", caseParam=" + caseParam 80 | + ", remark=" + remark + ", createtime=" + createtime 81 | + ", updatetime=" + updatetime + "]"; 82 | } 83 | 84 | 85 | } 86 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/APICaseNew.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class APICaseNew implements Serializable { 6 | 7 | private static final long serialVersionUID = 3942635254143979308L; 8 | 9 | private Integer id; 10 | private Integer dependCaseId; 11 | private String caseName; 12 | private String caseRelations ; 13 | private Integer isRun; 14 | private String remark; 15 | private String createTime; 16 | private String updateTime; 17 | 18 | 19 | 20 | public Integer getIsRun() { 21 | return isRun; 22 | } 23 | public void setIsRun(Integer isRun) { 24 | this.isRun = isRun; 25 | } 26 | public String getCaseRelations() { 27 | return caseRelations; 28 | } 29 | public void setCaseRelations(String caseRelations) { 30 | this.caseRelations = caseRelations; 31 | } 32 | public Integer getDependCaseId() { 33 | return dependCaseId; 34 | } 35 | public void setDependCaseId(Integer dependCaseId) { 36 | this.dependCaseId = dependCaseId; 37 | } 38 | public String getCaseName() { 39 | return caseName; 40 | } 41 | public void setCaseName(String caseName) { 42 | this.caseName = caseName; 43 | } 44 | 45 | public String getRemark() { 46 | return remark; 47 | } 48 | public void setRemark(String remark) { 49 | this.remark = remark; 50 | } 51 | public Integer getId() { 52 | return id; 53 | } 54 | public void setId(Integer id) { 55 | this.id = id; 56 | } 57 | public String getCreateTime() { 58 | return createTime; 59 | } 60 | public void setCreateTime(String createTime) { 61 | this.createTime = createTime; 62 | } 63 | public String getUpdateTime() { 64 | return updateTime; 65 | } 66 | public void setUpdateTime(String updateTime) { 67 | this.updateTime = updateTime; 68 | } 69 | @Override 70 | public String toString() { 71 | return "APICaseNew [id=" + id + ", dependCaseId=" + dependCaseId 72 | + ", caseName=" + caseName + ", caseRelations=" + caseRelations 73 | + ", isRun=" + isRun + ", remark=" + remark + ", createTime=" 74 | + createTime + ", updateTime=" + updateTime + "]"; 75 | } 76 | 77 | 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/APICaseRelation.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class APICaseRelation extends APIModel implements Serializable{ 6 | 7 | private static final long serialVersionUID = -1520719454944051879L; 8 | 9 | private Integer id; 10 | private Integer caseId; 11 | private Integer APIId; 12 | private String caseData; 13 | private String caseAssert; 14 | private String caseParam; 15 | private String createTime; 16 | private String updateTime; 17 | 18 | public Integer getId() { 19 | return id; 20 | } 21 | public void setId(Integer id) { 22 | this.id = id; 23 | } 24 | public Integer getCaseId() { 25 | return caseId; 26 | } 27 | public void setCaseId(Integer caseId) { 28 | this.caseId = caseId; 29 | } 30 | public Integer getAPIId() { 31 | return APIId; 32 | } 33 | public void setAPIId(Integer aPIId) { 34 | APIId = aPIId; 35 | } 36 | public String getCaseData() { 37 | return caseData; 38 | } 39 | public void setCaseData(String caseData) { 40 | this.caseData = caseData; 41 | } 42 | public String getCaseAssert() { 43 | return caseAssert; 44 | } 45 | public void setCaseAssert(String caseAssert) { 46 | this.caseAssert = caseAssert; 47 | } 48 | public String getCaseParam() { 49 | return caseParam; 50 | } 51 | public void setCaseParam(String caseParam) { 52 | this.caseParam = caseParam; 53 | } 54 | public String getCreateTime() { 55 | return createTime; 56 | } 57 | public void setCreateTime(String createTime) { 58 | this.createTime = createTime; 59 | } 60 | public String getUpdateTime() { 61 | return updateTime; 62 | } 63 | public void setUpdateTime(String updateTime) { 64 | this.updateTime = updateTime; 65 | } 66 | 67 | @Override 68 | public String toString() { 69 | return "APICaseRelation [id=" + id + ", caseId=" + caseId + ", APIId=" 70 | + APIId + ", caseData=" + caseData + ", caseAssert=" 71 | + caseAssert + ", caseParam=" + caseParam + ", createTime=" 72 | + createTime + ", updateTime=" + updateTime + "]"; 73 | } 74 | 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/APIModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | public class APIModel implements Serializable{ 8 | private static final long serialVersionUID = -5440715430717463877L; 9 | 10 | private Integer id; 11 | @NotBlank(message="HOST不能为空") 12 | private String apiHost; 13 | @NotBlank(message="apiName不能为空") 14 | private String apiName; 15 | @NotBlank(message="apiUrl不能为空") 16 | private String apiUrl; 17 | private String apiMethod; 18 | private String apiHeaders; 19 | // @NotBlank(message="apiParams不能为空") 20 | private String apiParams; 21 | private Integer apiStatus; 22 | private String remark; 23 | 24 | public String getApiHost() { 25 | return apiHost; 26 | } 27 | public void setApiHost(String apiHost) { 28 | this.apiHost = apiHost; 29 | } 30 | public Integer getId() { 31 | return id; 32 | } 33 | public void setId(Integer id) { 34 | this.id = id; 35 | } 36 | public String getApiName() { 37 | return apiName; 38 | } 39 | public void setApiName(String apiName) { 40 | this.apiName = apiName; 41 | } 42 | public String getApiUrl() { 43 | return apiUrl; 44 | } 45 | public void setApiUrl(String apiUrl) { 46 | this.apiUrl = apiUrl; 47 | } 48 | public String getApiMethod() { 49 | return apiMethod; 50 | } 51 | public void setApiMethod(String apiMethod) { 52 | this.apiMethod = apiMethod; 53 | } 54 | public String getApiHeaders() { 55 | return apiHeaders; 56 | } 57 | public void setApiHeaders(String apiHeaders) { 58 | this.apiHeaders = apiHeaders; 59 | } 60 | public String getApiParams() { 61 | return apiParams; 62 | } 63 | public void setApiParams(String apiParams) { 64 | this.apiParams = apiParams; 65 | } 66 | public String getRemark() { 67 | return remark; 68 | } 69 | public void setRemark(String remark) { 70 | this.remark = remark; 71 | } 72 | public Integer getApiStatus() { 73 | return apiStatus; 74 | } 75 | public void setApiStatus(Integer apiStatus) { 76 | this.apiStatus = apiStatus; 77 | } 78 | 79 | @Override 80 | public String toString() { 81 | return "APIModel [id=" + id + ", apiName=" + apiName + ", apiUrl=" 82 | + apiUrl + ", apiMethod=" + apiMethod + ", apiHeaders=" 83 | + apiHeaders + ", apiParams=" + apiParams + ", apiStatus=" 84 | + apiStatus + ", remark=" + remark + "]"; 85 | } 86 | 87 | 88 | 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/AssertModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class AssertModel implements Serializable{ 6 | 7 | private static final long serialVersionUID = -5952260322365822767L; 8 | 9 | private String assertItem; 10 | // private String actual; 11 | private String compare; 12 | private String expect; 13 | 14 | public String getAssertItem() { 15 | return assertItem; 16 | } 17 | public void setAssertItem(String assertItem) { 18 | this.assertItem = assertItem; 19 | } 20 | public String getCompare() { 21 | return compare; 22 | } 23 | public void setCompare(String compare) { 24 | this.compare = compare; 25 | } 26 | public String getExpect() { 27 | return expect; 28 | } 29 | public void setExpect(String expect) { 30 | this.expect = expect; 31 | } 32 | @Override 33 | public String toString() { 34 | return "AssertModel [assertItem=" + assertItem + ", compare=" + compare + ", expect=" + expect + "]"; 35 | } 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/AuditLoanModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class AuditLoanModel implements Serializable{ 6 | 7 | private static final long serialVersionUID = -4373112943523175213L; 8 | 9 | private int total; 10 | private int fail; 11 | private int overlimit; 12 | private int success; 13 | 14 | public int getTotal() { 15 | return total; 16 | } 17 | public void setTotal(int total) { 18 | this.total = total; 19 | } 20 | public int getFail() { 21 | return fail; 22 | } 23 | public void setFail(int fail) { 24 | this.fail = fail; 25 | } 26 | public int getOverlimit() { 27 | return overlimit; 28 | } 29 | public void setOverlimit(int overlimit) { 30 | this.overlimit = overlimit; 31 | } 32 | public int getSuccess() { 33 | return success; 34 | } 35 | public void setSuccess(int success) { 36 | this.success = success; 37 | } 38 | 39 | 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/CaseSetModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | 6 | public class CaseSetModel implements Serializable{ 7 | 8 | private static final long serialVersionUID = 838785932353553420L; 9 | 10 | private Integer id; 11 | private String caseSetName; 12 | private String caseRelation; 13 | private Integer caseCount; 14 | private String remark; 15 | private String createTime; 16 | private String updateTime; 17 | 18 | public Integer getId() { 19 | return id; 20 | } 21 | public void setId(Integer id) { 22 | this.id = id; 23 | } 24 | public String getCaseSetName() { 25 | return caseSetName; 26 | } 27 | public void setCaseSetName(String caseSetName) { 28 | this.caseSetName = caseSetName; 29 | } 30 | public String getCaseRelation() { 31 | return caseRelation; 32 | } 33 | public void setCaseRelation(String caseRelation) { 34 | this.caseRelation = caseRelation; 35 | } 36 | public Integer getCaseCount() { 37 | return caseCount; 38 | } 39 | public void setCaseCount(Integer caseCount) { 40 | this.caseCount = caseCount; 41 | } 42 | public String getRemark() { 43 | return remark; 44 | } 45 | public void setRemark(String remark) { 46 | this.remark = remark; 47 | } 48 | public String getCreateTime() { 49 | return createTime; 50 | } 51 | public void setCreateTime(String createTime) { 52 | this.createTime = createTime; 53 | } 54 | public String getUpdateTime() { 55 | return updateTime; 56 | } 57 | public void setUpdateTime(String updateTime) { 58 | this.updateTime = updateTime; 59 | } 60 | @Override 61 | public String toString() { 62 | return "CaseSetModel [id=" + id + ", caseSetName=" + caseSetName 63 | + ", caseRelation=" + caseRelation + ", caseCount=" + caseCount 64 | + ", remark=" + remark + ", createTime=" + createTime 65 | + ", updateTime=" + updateTime + "]"; 66 | } 67 | 68 | 69 | 70 | 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/CaseSetResultModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class CaseSetResultModel extends CaseSetModel implements Serializable{ 6 | 7 | private static final long serialVersionUID = -5462759168393061356L; 8 | 9 | private Integer id; 10 | private Integer setId; 11 | private String startTime; 12 | private String endTime; 13 | private long costTime; 14 | private long batch; 15 | private String createTime; 16 | private String runEnv; 17 | 18 | 19 | public String getRunEnv() { 20 | return runEnv; 21 | } 22 | public void setRunEnv(String runEnv) { 23 | this.runEnv = runEnv; 24 | } 25 | 26 | public long getBatch() { 27 | return batch; 28 | } 29 | public void setBatch(long batch) { 30 | this.batch = batch; 31 | } 32 | public Integer getId() { 33 | return id; 34 | } 35 | public void setId(Integer id) { 36 | this.id = id; 37 | } 38 | public Integer getSetId() { 39 | return setId; 40 | } 41 | public void setSetId(Integer setId) { 42 | this.setId = setId; 43 | } 44 | public String getStartTime() { 45 | return startTime; 46 | } 47 | public void setStartTime(String startTime) { 48 | this.startTime = startTime; 49 | } 50 | public String getEndTime() { 51 | return endTime; 52 | } 53 | public void setEndTime(String endTime) { 54 | this.endTime = endTime; 55 | } 56 | public long getCostTime() { 57 | return costTime; 58 | } 59 | public void setCostTime(long costTime) { 60 | this.costTime = costTime; 61 | } 62 | public String getCreateTime() { 63 | return createTime; 64 | } 65 | public void setCreateTime(String createTime) { 66 | this.createTime = createTime; 67 | } 68 | @Override 69 | public String toString() { 70 | return "CaseSetResultModel [id=" + id + ", setId=" + setId 71 | + ", startTime=" + startTime + ", endTime=" + endTime 72 | + ", costTime=" + costTime + ", batch=" + batch 73 | + ", createTime=" + createTime + "]"; 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/CommonDictModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class CommonDictModel implements Serializable{ 6 | private static final long serialVersionUID = -2484378158318782508L; 7 | 8 | private Integer id; 9 | private String dictType; 10 | private String dictCode; 11 | private String dictValue; 12 | private String remark; 13 | public Integer getId() { 14 | return id; 15 | } 16 | public void setId(Integer id) { 17 | this.id = id; 18 | } 19 | public String getDictType() { 20 | return dictType; 21 | } 22 | public void setDictType(String dictType) { 23 | this.dictType = dictType; 24 | } 25 | public String getDictCode() { 26 | return dictCode; 27 | } 28 | public void setDictCode(String dictCode) { 29 | this.dictCode = dictCode; 30 | } 31 | public String getDictValue() { 32 | return dictValue; 33 | } 34 | public void setDictValue(String dictValue) { 35 | this.dictValue = dictValue; 36 | } 37 | public String getRemark() { 38 | return remark; 39 | } 40 | public void setRemark(String remark) { 41 | this.remark = remark; 42 | } 43 | @Override 44 | public String toString() { 45 | return "CommonDictModel [id=" + id + ", dictType=" + dictType 46 | + ", dictCode=" + dictCode + ", dictValue=" + dictValue 47 | + ", remark=" + remark + "]"; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/EnvInfoModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class EnvInfoModel implements Serializable{ 6 | 7 | private static final long serialVersionUID = -4884518165191068178L; 8 | 9 | private Integer id; 10 | private String envTitle; 11 | private String envDomain; 12 | private String envIp; 13 | private String createTime; 14 | 15 | public Integer getId() { 16 | return id; 17 | } 18 | public void setId(Integer id) { 19 | this.id = id; 20 | } 21 | public String getEnvTitle() { 22 | return envTitle; 23 | } 24 | public void setEnvTitle(String envTitle) { 25 | this.envTitle = envTitle; 26 | } 27 | public String getEnvDomain() { 28 | return envDomain; 29 | } 30 | public void setEnvDomain(String envDomain) { 31 | this.envDomain = envDomain; 32 | } 33 | public String getEnvIp() { 34 | return envIp; 35 | } 36 | public void setEnvIp(String envIp) { 37 | this.envIp = envIp; 38 | } 39 | public String getCreateTime() { 40 | return createTime; 41 | } 42 | public void setCreateTime(String createTime) { 43 | this.createTime = createTime; 44 | } 45 | @Override 46 | public String toString() { 47 | return "EnvModel [id=" + id + ", envTitle=" + envTitle + ", envDomain=" 48 | + envDomain + ", envIp=" + envIp + ", createTime=" + createTime 49 | + "]"; 50 | } 51 | 52 | 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/EnvVarModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | public class EnvVarModel implements Serializable{ 8 | 9 | 10 | private static final long serialVersionUID = 8447854677169302978L; 11 | 12 | private Integer id; 13 | @NotBlank(message="变量名不能重复且不为空") 14 | private String varName; 15 | private String varRule; 16 | @NotBlank(message="值不能为空") 17 | private String varValue; 18 | private Integer varType; 19 | private String createtime; 20 | private String updatetime; 21 | 22 | 23 | public Integer getVarType() { 24 | return varType; 25 | } 26 | public void setVarType(Integer varType) { 27 | this.varType = varType; 28 | } 29 | public Integer getId() { 30 | return id; 31 | } 32 | public void setId(Integer id) { 33 | this.id = id; 34 | } 35 | public String getVarName() { 36 | return varName; 37 | } 38 | public void setVarName(String varName) { 39 | this.varName = varName; 40 | } 41 | public String getVarRule() { 42 | return varRule; 43 | } 44 | public void setVarRule(String varRule) { 45 | this.varRule = varRule; 46 | } 47 | public String getVarValue() { 48 | return varValue; 49 | } 50 | public void setVarValue(String varValue) { 51 | this.varValue = varValue; 52 | } 53 | public String getCreatetime() { 54 | return createtime; 55 | } 56 | public void setCreatetime(String createtime) { 57 | this.createtime = createtime; 58 | } 59 | public String getUpdatetime() { 60 | return updatetime; 61 | } 62 | public void setUpdatetime(String updatetime) { 63 | this.updatetime = updatetime; 64 | } 65 | 66 | @Override 67 | public String toString() { 68 | return "EnvVarModel [id=" + id + ", varName=" + varName + ", varRule=" 69 | + varRule + ", varValue=" + varValue + ", varType=" + varType 70 | + ", createtime=" + createtime + ", updatetime=" + updatetime 71 | + "]"; 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/LoanDetailModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class LoanDetailModel implements Serializable{ 6 | 7 | private static final long serialVersionUID = 3668203498868770123L; 8 | 9 | private long id; 10 | private String serialId; 11 | private int amount; 12 | 13 | public int getAmount() { 14 | return amount; 15 | } 16 | public void setAmount(int amount) { 17 | this.amount = amount; 18 | } 19 | public long getId() { 20 | return id; 21 | } 22 | public void setId(long id) { 23 | this.id = id; 24 | } 25 | public String getSerialId() { 26 | return serialId; 27 | } 28 | public void setSerialId(String serialId) { 29 | this.serialId = serialId; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/MessageResult.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class MessageResult implements Serializable{ 6 | 7 | private static final long serialVersionUID = -8917312847015394981L; 8 | private String responseMessage; 9 | private String responseCode; 10 | private String status; 11 | private T data; 12 | 13 | 14 | public T getData() { 15 | return data; 16 | } 17 | public void setData(T data) { 18 | this.data = data; 19 | } 20 | public String getResponseMessage() { 21 | return responseMessage; 22 | } 23 | public void setResponseMessage(String responseMessage) { 24 | this.responseMessage = responseMessage; 25 | } 26 | public String getResponseCode() { 27 | return responseCode; 28 | } 29 | public void setResponseCode(String responseCode) { 30 | this.responseCode = responseCode; 31 | } 32 | public String getStatus() { 33 | return status; 34 | } 35 | public void setStatus(String status) { 36 | this.status = status; 37 | } 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/ParamModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class ParamModel implements Serializable{ 6 | 7 | private static final long serialVersionUID = 8756462503442586021L; 8 | 9 | private String param; 10 | private String method; 11 | private String rule; 12 | 13 | public String getParam() { 14 | return param; 15 | } 16 | public void setParam(String param) { 17 | this.param = param; 18 | } 19 | public String getMethod() { 20 | return method; 21 | } 22 | public void setMethod(String method) { 23 | this.method = method; 24 | } 25 | public String getRule() { 26 | return rule; 27 | } 28 | public void setRule(String rule) { 29 | this.rule = rule; 30 | } 31 | @Override 32 | public String toString() { 33 | return "paramEntity [param=" + param + ", method=" + method + ", rule=" 34 | + rule + "]"; 35 | } 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/Pie_Data.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Pie_Data implements Serializable{ 6 | 7 | private static final long serialVersionUID = 2517584971510387244L; 8 | 9 | private Integer value; 10 | private String name; 11 | public Integer getValue() { 12 | return value; 13 | } 14 | public void setValue(Integer value) { 15 | this.value = value; 16 | } 17 | public String getName() { 18 | return name; 19 | } 20 | public void setName(String name) { 21 | this.name = name; 22 | } 23 | @Override 24 | public String toString() { 25 | return "Pie_Data [value=" + value + ", name=" + name + "]"; 26 | } 27 | 28 | 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/ResponseDetailModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class ResponseDetailModel implements Serializable{ 6 | 7 | private static final long serialVersionUID = 7124211329511097218L; 8 | private String errorDetails; 9 | private Integer status; 10 | private T data; 11 | private String errorCode; 12 | 13 | public String getErrorDetails() { 14 | return errorDetails; 15 | } 16 | public void setErrorDetails(String errorDetails) { 17 | this.errorDetails = errorDetails; 18 | } 19 | public Integer getStatus() { 20 | return status; 21 | } 22 | public void setStatus(Integer status) { 23 | this.status = status; 24 | } 25 | public T getData() { 26 | return data; 27 | } 28 | public void setData(T data) { 29 | this.data = data; 30 | } 31 | public String getErrorCode() { 32 | return errorCode; 33 | } 34 | public void setErrorCode(String errorCode) { 35 | this.errorCode = errorCode; 36 | } 37 | 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/Result.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Result implements Serializable{ 6 | 7 | private static final long serialVersionUID = 3083928596044215515L; 8 | 9 | private String contractId; 10 | private String transId; 11 | private String status; 12 | private String returnMsg; 13 | 14 | 15 | public String getTransId() { 16 | return transId; 17 | } 18 | public void setTransId(String transId) { 19 | this.transId = transId; 20 | } 21 | public String getContractId() { 22 | return contractId; 23 | } 24 | public void setContractId(String contractId) { 25 | this.contractId = contractId; 26 | } 27 | public String getStatus() { 28 | return status; 29 | } 30 | public void setStatus(String status) { 31 | this.status = status; 32 | } 33 | public String getReturnMsg() { 34 | return returnMsg; 35 | } 36 | public void setReturnMsg(String returnMsg) { 37 | this.returnMsg = returnMsg; 38 | } 39 | @Override 40 | public String toString() { 41 | return "Result [contractId=" + contractId + ", status=" + status 42 | + ", returnMsg=" + returnMsg + "]"; 43 | } 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/ResultData.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | public class ResultData implements Serializable{ 7 | 8 | private static final long serialVersionUID = -3257963121426526464L; 9 | 10 | private String resultStatus; 11 | private List totalArray; 12 | 13 | public String getResultStatus() { 14 | return resultStatus; 15 | } 16 | public void setResultStatus(String resultStatus) { 17 | this.resultStatus = resultStatus; 18 | } 19 | public List getTotalArray() { 20 | return totalArray; 21 | } 22 | public void setTotalArray(List totalArray) { 23 | this.totalArray = totalArray; 24 | } 25 | @Override 26 | public String toString() { 27 | return "ResultData [resultStatus=" + resultStatus + ", totalArray=" 28 | + totalArray + "]"; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/UserModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | public class UserModel implements Serializable{ 8 | 9 | private static final long serialVersionUID = -3422907056694697856L; 10 | 11 | private Integer id; 12 | private String user; 13 | @NotBlank(message="密码不能为空") 14 | private String userPwd; 15 | @NotBlank(message="用户名不为空") 16 | private String userName; 17 | private String userIp; 18 | @NotBlank(message="邮箱不能为空") 19 | private String email; 20 | private String creatTime; 21 | 22 | public Integer getId() { 23 | return id; 24 | } 25 | public void setId(Integer id) { 26 | this.id = id; 27 | } 28 | public String getUser() { 29 | return user; 30 | } 31 | public void setUser(String user) { 32 | this.user = user; 33 | } 34 | public String getUserPwd() { 35 | return userPwd; 36 | } 37 | public void setUserPwd(String userPwd) { 38 | this.userPwd = userPwd; 39 | } 40 | public String getUserName() { 41 | return userName; 42 | } 43 | public void setUserName(String userName) { 44 | this.userName = userName; 45 | } 46 | public String getUserIp() { 47 | return userIp; 48 | } 49 | public void setUserIp(String userIp) { 50 | this.userIp = userIp; 51 | } 52 | public String getEmail() { 53 | return email; 54 | } 55 | public void setEmail(String email) { 56 | this.email = email; 57 | } 58 | 59 | public String getCreatTime() { 60 | return creatTime; 61 | } 62 | public void setCreatTime(String creatTime) { 63 | this.creatTime = creatTime; 64 | } 65 | @Override 66 | public String toString() { 67 | return "UserModel [id=" + id + ", user=" + user + ", userPwd=" 68 | + userPwd + ", userName=" + userName + ", userIp=" + userIp 69 | + ", email=" + email + ", creatTime=" + creatTime + "]"; 70 | } 71 | 72 | 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/certInfoModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class certInfoModel implements Serializable{ 6 | 7 | private static final long serialVersionUID = 5559592120883645043L; 8 | 9 | private String certType; 10 | private String original; 11 | private String path; 12 | public String getCertType() { 13 | return certType; 14 | } 15 | public void setCertType(String certType) { 16 | this.certType = certType; 17 | } 18 | public String getOriginal() { 19 | return original; 20 | } 21 | public void setOriginal(String original) { 22 | this.original = original; 23 | } 24 | public String getPath() { 25 | return path; 26 | } 27 | public void setPath(String path) { 28 | this.path = path; 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/loanResult.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | public class loanResult implements Serializable{ 7 | 8 | private static final long serialVersionUID = 4506695947663842297L; 9 | 10 | private Integer rows; 11 | private Integer sucessRows; 12 | private List results; 13 | // private Integer signStatus;// 1 发标 2 不发标 14 | 15 | public List getResults() { 16 | return results; 17 | } 18 | public void setResults(List results) { 19 | this.results = results; 20 | } 21 | public Integer getRows() { 22 | return rows; 23 | } 24 | public void setRows(Integer rows) { 25 | this.rows = rows; 26 | } 27 | public Integer getSucessRows() { 28 | return sucessRows; 29 | } 30 | public void setSucessRows(Integer sucessRows) { 31 | this.sucessRows = sucessRows; 32 | } 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/mortgageModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class mortgageModel implements Serializable{ 6 | private static final long serialVersionUID = -3961005351282510009L; 7 | private String mortgageType; 8 | private String holder; 9 | private String city; 10 | private double houseArea; 11 | private String vehicleType; 12 | private String carNo; 13 | private double mileage; 14 | private double purchaseAmt; 15 | private double valuationAmt; 16 | private String registTime; 17 | private String remark; 18 | public String getMortgageType() { 19 | return mortgageType; 20 | } 21 | public void setMortgageType(String mortgageType) { 22 | this.mortgageType = mortgageType; 23 | } 24 | public String getHolder() { 25 | return holder; 26 | } 27 | public void setHolder(String holder) { 28 | this.holder = holder; 29 | } 30 | public String getCity() { 31 | return city; 32 | } 33 | public void setCity(String city) { 34 | this.city = city; 35 | } 36 | public double getHouseArea() { 37 | return houseArea; 38 | } 39 | public void setHouseArea(double houseArea) { 40 | this.houseArea = houseArea; 41 | } 42 | public String getVehicleType() { 43 | return vehicleType; 44 | } 45 | public void setVehicleType(String vehicleType) { 46 | this.vehicleType = vehicleType; 47 | } 48 | public String getCarNo() { 49 | return carNo; 50 | } 51 | public void setCarNo(String carNo) { 52 | this.carNo = carNo; 53 | } 54 | public double getMileage() { 55 | return mileage; 56 | } 57 | public void setMileage(double mileage) { 58 | this.mileage = mileage; 59 | } 60 | public double getPurchaseAmt() { 61 | return purchaseAmt; 62 | } 63 | public void setPurchaseAmt(double purchaseAmt) { 64 | this.purchaseAmt = purchaseAmt; 65 | } 66 | public double getValuationAmt() { 67 | return valuationAmt; 68 | } 69 | public void setValuationAmt(double valuationAmt) { 70 | this.valuationAmt = valuationAmt; 71 | } 72 | public String getRegistTime() { 73 | return registTime; 74 | } 75 | public void setRegistTime(String registTime) { 76 | this.registTime = registTime; 77 | } 78 | public String getRemark() { 79 | return remark; 80 | } 81 | public void setRemark(String remark) { 82 | this.remark = remark; 83 | } 84 | 85 | 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/test_details.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | public class test_details { 4 | 5 | private String title; 6 | private String url; 7 | private String method; 8 | private int status; 9 | private String request_headers; 10 | private String request_body; 11 | private String response_headers; 12 | private String response_body; 13 | private String start_time; 14 | private String end_time; 15 | private String description; 16 | 17 | 18 | 19 | public String getStart_time() { 20 | return start_time; 21 | } 22 | public void setStart_time(String start_time) { 23 | this.start_time = start_time; 24 | } 25 | public String getEnd_time() { 26 | return end_time; 27 | } 28 | public void setEnd_time(String end_time) { 29 | this.end_time = end_time; 30 | } 31 | public String getDescription() { 32 | return description; 33 | } 34 | public void setDescription(String description) { 35 | this.description = description; 36 | } 37 | public String getTitle() { 38 | return title; 39 | } 40 | public void setTitle(String title) { 41 | this.title = title; 42 | } 43 | public String getUrl() { 44 | return url; 45 | } 46 | public void setUrl(String url) { 47 | this.url = url; 48 | } 49 | public String getMethod() { 50 | return method; 51 | } 52 | public void setMethod(String method) { 53 | this.method = method; 54 | } 55 | public int getStatus() { 56 | return status; 57 | } 58 | public void setStatus(int status) { 59 | this.status = status; 60 | } 61 | public String getRequest_headers() { 62 | return request_headers; 63 | } 64 | public void setRequest_headers(String request_headers) { 65 | this.request_headers = request_headers; 66 | } 67 | public String getRequest_body() { 68 | return request_body; 69 | } 70 | public void setRequest_body(String request_body) { 71 | this.request_body = request_body; 72 | } 73 | public String getResponse_headers() { 74 | return response_headers; 75 | } 76 | public void setResponse_headers(String response_headers) { 77 | this.response_headers = response_headers; 78 | } 79 | public String getResponse_body() { 80 | return response_body; 81 | } 82 | public void setResponse_body(String response_body) { 83 | this.response_body = response_body; 84 | } 85 | 86 | 87 | 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/model/undueLoanInfoModel.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class undueLoanInfoModel implements Serializable{ 6 | 7 | private static final long serialVersionUID = -219125103337921954L; 8 | private String fundUse; 9 | private String financialCondition; 10 | private String repayAbilityChange; 11 | private String overdue; 12 | private String litigation; 13 | private String punishment; 14 | 15 | public String getFundUse() { 16 | return fundUse; 17 | } 18 | public void setFundUse(String fundUse) { 19 | this.fundUse = fundUse; 20 | } 21 | public String getFinancialCondition() { 22 | return financialCondition; 23 | } 24 | public void setFinancialCondition(String financialCondition) { 25 | this.financialCondition = financialCondition; 26 | } 27 | public String getRepayAbilityChange() { 28 | return repayAbilityChange; 29 | } 30 | public void setRepayAbilityChange(String repayAbilityChange) { 31 | this.repayAbilityChange = repayAbilityChange; 32 | } 33 | public String getOverdue() { 34 | return overdue; 35 | } 36 | public void setOverdue(String overdue) { 37 | this.overdue = overdue; 38 | } 39 | public String getLitigation() { 40 | return litigation; 41 | } 42 | public void setLitigation(String litigation) { 43 | this.litigation = litigation; 44 | } 45 | public String getPunishment() { 46 | return punishment; 47 | } 48 | public void setPunishment(String punishment) { 49 | this.punishment = punishment; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/APICaseNewService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | import java.util.List; 4 | import com.xiaoniu.model.APICaseNew; 5 | 6 | public interface APICaseNewService { 7 | 8 | //获取待运行用例 9 | List getALLAPICaseNew(APICaseNew APIcaseNew); 10 | //获取单个测试用例 11 | APICaseNew getAPICaseNew(Integer id); 12 | //添加运行测试用例 13 | Integer addAPICaseNew(Integer dependCaseId,String caseName,String remark); 14 | //获取单个测试用例 15 | Integer getMaxCaseId(); 16 | //通过ID删除运行测试用例 17 | Integer delAPICaseNew(Integer id); 18 | //更新用例运行状态 19 | // Integer updateAPICaseIsRun(Integer id,Integer isRun); 20 | //更新用例 21 | Integer updateAPICaseNew(Integer id,Integer dependCaseId,String remark); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/APICaseRelationService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | import java.util.List; 4 | import com.xiaoniu.model.APICaseRelation; 5 | 6 | public interface APICaseRelationService { 7 | //通过用例ID获取用例下面所有接口 8 | List getAPICaseRelations(Integer caseId); 9 | //通过用例ID和接口ID获取接口 10 | APICaseRelation getAPIRelation(Integer relationId,Integer caseId,Integer APIId); 11 | //添加测试用例关联的接口 12 | Integer addAPICaseRelation(Integer caseId,Integer APIId,String caseData,String caseAssert,String caseParam); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/APIResultService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | import java.util.List; 4 | import com.xiaoniu.model.CaseResultModel; 5 | 6 | public interface APIResultService { 7 | 8 | //查询运行接口结果 9 | List getAPIResult(Integer caseId); 10 | //通过用例集和用例ID获取接口结果 11 | List getAPIResultBySetId(Integer caseId,Integer setId); 12 | //通过用例集和用例ID、批次号获取接口结果 13 | List getAPIResultBybatch(Integer caseId,Integer setId,long batch); 14 | //添加运行接口结果 15 | Integer addAPIResult(Integer caseId,Integer APIId,Integer relationId,Integer setId,String startTime,String endTime,long costTime,String request,Integer statusCode,String response,long batch); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/APIService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | import java.util.List; 4 | 5 | import com.xiaoniu.model.APIModel; 6 | 7 | public interface APIService { 8 | 9 | //获取所有接口 10 | List getALLAPI(APIModel APImodel); 11 | //通过ID获取接口 12 | APIModel getAPI(Integer id); 13 | //通过ID删除接口 14 | Integer delAPI(Integer id); 15 | //添加接口 16 | Integer addAPI(String apiName,String apiHost,String apiUrl,String apiMethod,String apiHeaders,String apiParams,Integer apiStatus,String remark); 17 | //修改接口 18 | Integer updateAPI(Integer id,String apiName,String apiHost,String apiUrl,String apiMethod,String apiHeaders,String apiParams,Integer apiStatus,String remark); 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/CaseResultService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | import java.util.List; 4 | import com.xiaoniu.model.CaseResultModel; 5 | 6 | 7 | 8 | public interface CaseResultService { 9 | //查询运行测试用例结果 10 | CaseResultModel getCaseResult(Integer caseId); 11 | //通过批次号获取用例结果 12 | List getCaseResultByBatch(long batch,String resultStatus); 13 | //添加运行测试用例结果 14 | Integer addCaseResult(Integer caseId,Integer setId,String startTime,String endTime,long costTime,String resultStatus,String runEnv,long batch); 15 | //修改运行测试用例结果 16 | Integer updateCaseResult(Integer caseId,String startTime,String endTime,long costTime,String resultStatus); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/CaseSetService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | import java.util.List; 4 | 5 | import com.xiaoniu.model.CaseResultModel; 6 | import com.xiaoniu.model.CaseSetModel; 7 | import com.xiaoniu.model.CaseSetResultModel; 8 | 9 | public interface CaseSetService { 10 | //获取测试用例集 11 | List getAllSet(CaseSetModel caseSetModel); 12 | //通过ID获取用例集 13 | CaseSetModel getSet(Integer id); 14 | //通过ID删除用例集 15 | Integer delSet(Integer id); 16 | //新增用例集 17 | Integer addSet(String caseSetName,String caseRelation,Integer caseCount,String remark); 18 | //修改用例集 19 | Integer updateSet(Integer id,String caseRelation,Integer caseCount,String remark); 20 | //新增用例集结果 21 | Integer addSetResult(Integer setId,String startTime,String endTime,long costTime,String runEnv,long batch); 22 | //获取用例集结果 23 | CaseSetResultModel getSetResult(Integer setId); 24 | //通过用例集ID获取用例结果 25 | List getSetCaseResult(Integer setId,String resultStatus); 26 | //查询setId为-1,最近七次执行结果 27 | List getSetResultRent(Integer setId); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/EnvInfoService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | import java.util.List; 4 | 5 | import com.xiaoniu.model.EnvInfoModel; 6 | 7 | public interface EnvInfoService { 8 | 9 | Integer addEnv(String envTitle,String envDomain,String envIp); 10 | 11 | Integer delEnv(Integer id); 12 | 13 | EnvInfoModel getEnv(Integer id); 14 | 15 | EnvInfoModel getServer(EnvInfoModel envModel); 16 | 17 | List getAllEnv(EnvInfoModel envModel); 18 | 19 | List getEnvALLTitle(); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/EnvVarService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | import java.util.List; 4 | import com.xiaoniu.model.EnvVarModel; 5 | 6 | public interface EnvVarService { 7 | //添加变量 8 | Integer addVar(String varName,String varValue,Integer varType); 9 | //修改变量 10 | Integer updateVar(Integer id,String varName,String varValue); 11 | //删除变量 12 | Integer delVar(Integer id); 13 | //获取全部变量 14 | List getAllVar(EnvVarModel envVarModel); 15 | //通过ID获取变量 16 | EnvVarModel getVar(Integer id); 17 | //通过变量名获取变量 18 | EnvVarModel getVarByName(String varName); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/HandleService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | public interface HandleService { 4 | //参数替换 5 | String replaceParam(String requestData); 6 | //随机生成数据 7 | String tempVar(String requestData,String reg); 8 | // 替换APP/WEB Server host 9 | String ServerHost(String requestData,String runEnv); 10 | //结果验证 11 | void resultAssert(String AssertContent,Integer statusCode,String response); 12 | //数据提取 13 | void paramExtraction(String Params,String response); 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/HttpClientService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | import com.xiaoniu.httpclient.HttpResult; 4 | 5 | public interface HttpClientService { 6 | 7 | //发送http请求 8 | HttpResult doSend(String runEnv,String method,String URL,String data); 9 | 10 | // void DNSResolver(String runEnv); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/SyncService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | public interface SyncService { 4 | //通过集合ID将用例同步数据至平台 5 | void SyncData(Integer setId); 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/TelnetService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | public interface TelnetService { 4 | //telnet端口 5 | public boolean connect(String ip, Integer port); 6 | //执行发送命令 7 | public String execute(String command); 8 | //关闭连接 9 | public void disconnect(); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/TempVarService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | import com.xiaoniu.model.EnvVarModel; 4 | 5 | public interface TempVarService { 6 | //添加变量 7 | Integer addTempVar(String varName,String varRule,String varValue); 8 | //通过变量名获取变量 9 | EnvVarModel getTempVarByName(String varName); 10 | //清空临时表 11 | void truncateVarTemp(); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | 4 | import java.util.List; 5 | import com.xiaoniu.model.UserModel; 6 | 7 | public interface UserService { 8 | 9 | UserModel findByUsername(String user,String userPwd); 10 | 11 | Integer registerUser(String user,String userPwd,String userName,String userIp,String email ); 12 | 13 | List getAllUser(UserModel userModel); 14 | 15 | UserModel getUserById(Integer id); 16 | 17 | Integer delUser(Integer id); 18 | 19 | Integer UpdateUser(Integer id,String userPwd,String userName,String email); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/service/construcatDataService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.service; 2 | 3 | import java.util.List; 4 | 5 | import com.xiaoniu.model.ResponseDetailModel; 6 | import com.xiaoniu.model.loanDataModel; 7 | 8 | public interface construcatDataService { 9 | //导资产 10 | public String importLoan(String contractid,loanDataModel loanDataModel); 11 | //执行风控 12 | public void loanRisk(); 13 | //获取资产信息 14 | public String getLoan(String contractid); 15 | //风控审核 16 | public void auditRisk(List serialId); 17 | //资产审核 18 | public String auditLoan(List data,String approveStatus); 19 | //推送资产 20 | public void sendLoan(); 21 | //资产提前还款 22 | public ResponseDetailModel prePay(Long loanId) throws InterruptedException; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/serviceImp/APICaseRelationServiceImp.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.serviceImp; 2 | 3 | import java.util.List; 4 | 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import com.xiaoniu.mapper.APICaseRelationMapper; 11 | import com.xiaoniu.model.APICaseRelation; 12 | import com.xiaoniu.service.APICaseRelationService; 13 | 14 | 15 | @Service 16 | public class APICaseRelationServiceImp implements APICaseRelationService{ 17 | private Logger logger =LoggerFactory.getLogger(APICaseRelationServiceImp.class); 18 | 19 | @Autowired 20 | private APICaseRelationMapper APIcaseRelationMapper; 21 | 22 | @Override 23 | public List getAPICaseRelations(Integer caseId) { 24 | logger.info("跟据caseId<"+caseId+">查询测试用例关联的接口"); 25 | List APIRelations=APIcaseRelationMapper.getAPICaseRelations(caseId); 26 | if(APIRelations!=null){ 27 | return APIRelations; 28 | }else{ 29 | logger.info("获取测试用例关联的接口为空"); 30 | return null; 31 | } 32 | } 33 | 34 | @Override 35 | public Integer addAPICaseRelation(Integer caseId, Integer APIId, 36 | String caseData, String caseAssert, String caseParam) { 37 | logger.info("新增测试用例关联接口"); 38 | int count=APIcaseRelationMapper.addAPICaseRelation(caseId, APIId, caseData, caseAssert, caseParam); 39 | return count; 40 | } 41 | 42 | @Override 43 | public APICaseRelation getAPIRelation(Integer relationId,Integer caseId, Integer APIId) { 44 | logger.info("跟据relationId<"+relationId+">caseId<"+caseId+">APIId<"+APIId+"查询测试用例关联的接口"); 45 | APICaseRelation APIcaseRelation=APIcaseRelationMapper.getAPIRelation(relationId,caseId, APIId); 46 | return APIcaseRelation; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/serviceImp/APIResultServiceImp.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.serviceImp; 2 | 3 | import java.util.List; 4 | 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import com.xiaoniu.mapper.APIResultMapper; 11 | import com.xiaoniu.model.CaseResultModel; 12 | import com.xiaoniu.service.APIResultService; 13 | 14 | @Service 15 | public class APIResultServiceImp implements APIResultService{ 16 | private Logger logger =LoggerFactory.getLogger(APIResultServiceImp.class); 17 | 18 | 19 | @Autowired 20 | private APIResultMapper APIresultMapper; 21 | 22 | @Override 23 | public List getAPIResult(Integer caseId) { 24 | logger.info("通过id<"+caseId+">获取用例执行结果"); 25 | List resultModels=APIresultMapper.getAPIResult(caseId); 26 | if(resultModels!=null){ 27 | return resultModels; 28 | }else{ 29 | logger.info("获取用例执行结果为空"); 30 | return null; 31 | } 32 | } 33 | @Override 34 | public List getAPIResultBySetId(Integer caseId, Integer setId) { 35 | logger.info("通过用例集<"+setId+">和用例<"+caseId+">获取用例执行结果"); 36 | List resultModels=APIresultMapper.getAPIResultBySetId(caseId, setId); 37 | if(resultModels!=null){ 38 | return resultModels; 39 | }else{ 40 | logger.info("获取用例执行结果为空"); 41 | return null; 42 | } 43 | } 44 | 45 | @Override 46 | public Integer addAPIResult(Integer caseId, Integer APIId,Integer relationId, Integer setId, 47 | String startTime, String endTime, long costTime, String request,Integer statusCode, 48 | String response, long batch) { 49 | logger.info("新增用例执行结果"); 50 | int count=APIresultMapper.addAPIResult(caseId, APIId,relationId, setId, startTime, endTime, costTime, request,statusCode, response, batch); 51 | return count; 52 | } 53 | 54 | @Override 55 | public List getAPIResultBybatch(Integer caseId,Integer setId, long batch) { 56 | logger.info("通过用例集<"+setId+">、用例<"+caseId+">、批次号<"+batch+">获取用例执行结果"); 57 | List resultModels=APIresultMapper.getAPIResultBybatch(caseId, setId, batch); 58 | if(resultModels!=null){ 59 | return resultModels; 60 | }else{ 61 | logger.info("获取用例执行结果为空"); 62 | return null; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/serviceImp/APIServiceImp.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.serviceImp; 2 | 3 | import java.util.List; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import com.xiaoniu.mapper.APIMapper; 9 | import com.xiaoniu.model.APIModel; 10 | import com.xiaoniu.service.APIService; 11 | 12 | @Service 13 | public class APIServiceImp implements APIService{ 14 | private Logger log = LoggerFactory.getLogger(APIServiceImp.class); 15 | 16 | @Autowired 17 | private APIMapper APImapper; 18 | 19 | 20 | @Override 21 | public List getALLAPI(APIModel APImodel) { 22 | log.info("获取所有接口"); 23 | List APIList=APImapper.getALLAPI(APImodel); 24 | if(APIList!=null){ 25 | return APIList; 26 | }else{ 27 | log.info("获取测试用例为空"); 28 | return null; 29 | } 30 | } 31 | 32 | @Override 33 | public APIModel getAPI(Integer id) { 34 | log.info("跟据id<"+id+">查询接口"); 35 | APIModel API= APImapper.getAPI(id); 36 | if(API!=null){ 37 | return API; 38 | }else{ 39 | log.info("查询测试用例为空"); 40 | return null; 41 | } 42 | } 43 | 44 | @Override 45 | public Integer delAPI(Integer id) { 46 | log.info("删除接口id<"+id+">"); 47 | int count=APImapper.delAPI(id); 48 | return count; 49 | } 50 | 51 | @Override 52 | public Integer addAPI(String apiName, String apiHost, String apiUrl, 53 | String apiMethod, String apiHeaders, String apiParams, 54 | Integer apiStatus, String remark) { 55 | 56 | log.info("新增接口"); 57 | int count=APImapper.addAPI(apiName, apiHost, apiUrl, apiMethod, apiHeaders, apiParams, apiStatus, remark); 58 | return count; 59 | } 60 | 61 | @Override 62 | public Integer updateAPI(Integer id, String apiName, String apiHost, 63 | String apiUrl, String apiMethod, String apiHeaders, 64 | String apiParams, Integer apiStatus, String remark) { 65 | 66 | log.info("修改id<"+id+">接口"); 67 | int count=APImapper.updateAPI(id, apiName, apiHost, apiUrl, apiMethod, apiHeaders, apiParams, apiStatus, remark); 68 | return count; 69 | } 70 | 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/serviceImp/CaseResultServiceImp.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.serviceImp; 2 | 3 | import java.util.List; 4 | 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import com.xiaoniu.mapper.APICaseNewMapper; 11 | import com.xiaoniu.mapper.CaseResultMapper; 12 | import com.xiaoniu.model.APICaseNew; 13 | import com.xiaoniu.model.CaseResultModel; 14 | import com.xiaoniu.service.CaseResultService; 15 | 16 | @Service 17 | public class CaseResultServiceImp implements CaseResultService{ 18 | private Logger log = LoggerFactory.getLogger(CaseResultServiceImp.class); 19 | 20 | @Autowired 21 | private CaseResultMapper CaseresultMapper; 22 | 23 | @Autowired 24 | private APICaseNewMapper APIcaseNewMapper; 25 | 26 | @Override 27 | public CaseResultModel getCaseResult(Integer caseId) { 28 | log.info("通过id<"+caseId+">获取用例执行结果"); 29 | CaseResultModel caseResult =CaseresultMapper.getCaseResult(caseId); 30 | return caseResult; 31 | } 32 | 33 | @Override 34 | public Integer addCaseResult(Integer caseId,Integer setId, String startTime, 35 | String endTime, long costTime, String resultStatus,String runEnv,long batch) { 36 | log.info("新增用例执行结果"); 37 | int count=CaseresultMapper.addCaseResult(caseId,setId, startTime, endTime, costTime, resultStatus,runEnv,batch); 38 | return count; 39 | } 40 | 41 | @Override 42 | public Integer updateCaseResult(Integer caseId, String startTime, 43 | String endTime, long costTime, String resultStatus) { 44 | log.info("修改用例执行结果"); 45 | int count=CaseresultMapper.updateCaseResult(caseId, startTime, endTime, costTime, resultStatus); 46 | return count; 47 | } 48 | 49 | @Override 50 | public List getCaseResultByBatch(long batch,String resultStatus) { 51 | log.info("通过batch<"+batch+">获取用例执行结果"); 52 | List caseResults=CaseresultMapper.getCaseResultByBatch(batch, resultStatus); 53 | if(caseResults!=null){ 54 | for(CaseResultModel caseResult:caseResults){ 55 | APICaseNew APIcaseNew=APIcaseNewMapper.getAPICaseNew(caseResult.getCaseId()); 56 | caseResult.setCaseName(APIcaseNew.getCaseName()); 57 | } 58 | return caseResults; 59 | }else{ 60 | log.info("通过batch<"+batch+">获取用例执行结果为空"); 61 | return null; 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/serviceImp/EnvInfoServiceImp.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.serviceImp; 2 | 3 | import java.util.List; 4 | 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import com.xiaoniu.mapper.EnvInfoMapper; 11 | import com.xiaoniu.model.EnvInfoModel; 12 | import com.xiaoniu.service.EnvInfoService; 13 | 14 | @Service 15 | public class EnvInfoServiceImp implements EnvInfoService{ 16 | private Logger logger=LoggerFactory.getLogger(EnvInfoServiceImp.class); 17 | 18 | @Autowired 19 | private EnvInfoMapper envInfoMapper; 20 | 21 | @Override 22 | public Integer addEnv(String envTitle, String envDomain, String envIp) { 23 | logger.info("新增接口环境信息"); 24 | int count=envInfoMapper.addEnv(envTitle, envDomain, envIp); 25 | return count; 26 | } 27 | 28 | @Override 29 | public Integer delEnv(Integer id) { 30 | logger.info("删除id<"+id+">环境信息"); 31 | int count=envInfoMapper.delEnv(id); 32 | return count; 33 | } 34 | 35 | @Override 36 | public EnvInfoModel getEnv(Integer id) { 37 | logger.info("跟据id<"+id+">查询环境信息"); 38 | EnvInfoModel envInfo=envInfoMapper.getEnv(id); 39 | return envInfo; 40 | } 41 | 42 | @Override 43 | public List getAllEnv(EnvInfoModel envModel) { 44 | if(envModel !=null){ 45 | logger.info("跟据标题<"+envModel.getEnvTitle()+">查询环境信息"); 46 | } 47 | List envInfoList=envInfoMapper.getAllEnv(envModel); 48 | if(envInfoList !=null){ 49 | return envInfoList; 50 | }else{ 51 | logger.info("获取环境信息为空"); 52 | return null; 53 | } 54 | 55 | } 56 | 57 | @Override 58 | public List getEnvALLTitle() { 59 | List envInfoList=envInfoMapper.getEnvALLTitle(); 60 | if(envInfoList !=null){ 61 | return envInfoList; 62 | }else{ 63 | logger.info("获取环境标题为空"); 64 | return null; 65 | } 66 | } 67 | 68 | @Override 69 | public EnvInfoModel getServer(EnvInfoModel envModel) { 70 | if(envModel !=null){ 71 | logger.info("跟据标题<"+envModel.getEnvTitle()+">查询APP/WEB host"); 72 | EnvInfoModel envHost=envInfoMapper.getServer(envModel); 73 | return envHost; 74 | }else{ 75 | logger.info("获取环境信息为空"); 76 | return null; 77 | } 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/serviceImp/EnvVarServiceImp.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.serviceImp; 2 | 3 | import java.util.List; 4 | 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | import com.xiaoniu.mapper.EnvVarMapper; 10 | import com.xiaoniu.model.EnvVarModel; 11 | import com.xiaoniu.service.EnvVarService; 12 | 13 | @Service 14 | public class EnvVarServiceImp implements EnvVarService{ 15 | private Logger logger = LoggerFactory.getLogger(EnvVarServiceImp.class); 16 | 17 | @Autowired 18 | private EnvVarMapper envVarMapper; 19 | 20 | @Override 21 | public Integer addVar(String varName, String varValue, Integer varType) { 22 | logger.info("新增变量"); 23 | int count=envVarMapper.addVar(varName, varValue, varType); 24 | return count; 25 | } 26 | 27 | @Override 28 | public Integer updateVar(Integer id, String varName, String varValue) { 29 | logger.info("修改变量"); 30 | int count=envVarMapper.updateVar(id, varName, varValue); 31 | return count; 32 | } 33 | 34 | @Override 35 | public Integer delVar(Integer id) { 36 | logger.info("删除变量<"+id+">"); 37 | int count=envVarMapper.delVar(id); 38 | return count; 39 | } 40 | 41 | @Override 42 | public List getAllVar(EnvVarModel envVarModel) { 43 | logger.info("查询变量"); 44 | List varList=envVarMapper.getAllVar(envVarModel); 45 | if(varList!=null){ 46 | return varList; 47 | }else{ 48 | logger.info("查询变量结果为空"); 49 | return null; 50 | } 51 | } 52 | 53 | @Override 54 | public EnvVarModel getVar(Integer id) { 55 | logger.info("变量<"+id+">查询"); 56 | EnvVarModel var=envVarMapper.getVar(id); 57 | if(var!=null){ 58 | return var; 59 | }else{ 60 | logger.info("查询变量结果为空"); 61 | return null; 62 | } 63 | } 64 | 65 | @Override 66 | public EnvVarModel getVarByName(String varName) { 67 | logger.info("变量名<"+varName+">查询"); 68 | EnvVarModel var=envVarMapper.getVarByName(varName); 69 | if(var!=null){ 70 | return var; 71 | }else{ 72 | logger.info("查询变量结果为空"); 73 | return null; 74 | } 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/serviceImp/TempVarServiceImp.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.serviceImp; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.xiaoniu.mapper.TempVarMapper; 9 | import com.xiaoniu.model.EnvVarModel; 10 | import com.xiaoniu.service.TempVarService; 11 | 12 | @Service 13 | public class TempVarServiceImp implements TempVarService{ 14 | private Logger logger=LoggerFactory.getLogger(TempVarServiceImp.class); 15 | 16 | @Autowired 17 | private TempVarMapper tempVarMapper; 18 | 19 | @Override 20 | public Integer addTempVar(String varName,String varRule, String varValue) { 21 | EnvVarModel var=tempVarMapper.getTempVarByName(varName); 22 | if(var !=null){ 23 | logger.info("临时变量<"+varName+">已存在,勿重复添加"); 24 | return null; 25 | }else{ 26 | logger.info("添加临时变量<"+varName+":"+varValue+">"); 27 | int count=tempVarMapper.addTempVar(varName,varRule, varValue); 28 | return count; 29 | } 30 | } 31 | 32 | @Override 33 | public EnvVarModel getTempVarByName(String varName) { 34 | EnvVarModel var=tempVarMapper.getTempVarByName(varName); 35 | if(var!=null){ 36 | return var; 37 | }else{ 38 | logger.info("未查询到临时变量"); 39 | return null; 40 | } 41 | } 42 | 43 | @Override 44 | public void truncateVarTemp() { 45 | logger.info("清空临时变量表"); 46 | tempVarMapper.truncateVarTemp(); 47 | 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/serviceImp/UserServiceImp.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.serviceImp; 2 | 3 | import java.util.List; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import com.xiaoniu.mapper.UserMapper; 9 | import com.xiaoniu.model.UserModel; 10 | import com.xiaoniu.service.UserService; 11 | 12 | @Service 13 | public class UserServiceImp implements UserService{ 14 | private Logger logger=LoggerFactory.getLogger(UserServiceImp.class); 15 | 16 | @Autowired 17 | private UserMapper userMapper; 18 | 19 | @Override 20 | public UserModel findByUsername(String user, String userPwd) { 21 | UserModel userModel=userMapper.findByUsername(user, userPwd); 22 | if(userModel!=null){ 23 | return userModel; 24 | }else{ 25 | logger.info("未查询到此用户<"+user+">和密码"); 26 | return null; 27 | } 28 | } 29 | 30 | @Override 31 | public Integer registerUser(String user, String userPwd, String userName,String userIp, String email) { 32 | int count=0; 33 | UserModel userModel=userMapper.checkUser(user); 34 | if(userModel!=null){ 35 | logger.info("用户已存在"); 36 | count=-1; 37 | }else{ 38 | count=userMapper.registerUser(user, userPwd, userName, userIp, email); 39 | } 40 | return count; 41 | } 42 | 43 | @Override 44 | public List getAllUser(UserModel userModel) { 45 | logger.info("获取所有用户"); 46 | List UserList=userMapper.getAllUser(userModel); 47 | if(UserList!=null){ 48 | return UserList; 49 | }else{ 50 | logger.info("获取用户为空"); 51 | return null; 52 | } 53 | } 54 | 55 | @Override 56 | public UserModel getUserById(Integer id) { 57 | logger.info("跟据id<"+id+">查询用户"); 58 | UserModel User=userMapper.getUserById(id); 59 | if(User!=null){ 60 | return User; 61 | }else{ 62 | logger.info("未查询到此用户"); 63 | return null; 64 | } 65 | } 66 | 67 | @Override 68 | public Integer delUser(Integer id) { 69 | logger.info("删除用户id<"+id+">"); 70 | int count=userMapper.delUser(id); 71 | return count; 72 | } 73 | 74 | @Override 75 | public Integer UpdateUser(Integer id, String userPwd, String userName, String email) { 76 | logger.info("修改用户id<"+id+">"); 77 | int count=userMapper.UpdateUser(id, userPwd, userName, email); 78 | return count; 79 | 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/tools/Generator/BankCardNumberGenerator.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.tools.Generator; 2 | 3 | import java.util.Random; 4 | 5 | import org.apache.commons.lang3.StringUtils; 6 | 7 | 8 | /** 9 | * 生成的银行卡存在,部分不存在 10 | * 效验是否为银行卡,用于验证 11 | * 现行 16 位银联卡现行卡号开头 6 位是 622126~622925 之间的,7 到 15 位是银行自定义的, 12 | * 银行卡卡号:http://www.atool.org/bank.php验证网站 13 | * 6226095711989751 14 | * 可能是发卡分行,发卡网点,发卡序号,第 16 位是校验码。 15 | * 16 位卡号校验位采用 Luhm 校验方法计算: 16 | * 1,将未带校验位的 15 位卡号从右依次编号 1 到 15,位于奇数位号上的数字乘以 2 17 | * 2,将奇位乘积的个十位全部相加,再加上所有偶数位上的数字 18 | * 3,将加法和加上校验位能被 10 整除。 19 | */ 20 | public class BankCardNumberGenerator extends GenericGenerator { 21 | private static GenericGenerator instance = new BankCardNumberGenerator(); 22 | private BankCardNumberGenerator() { 23 | } 24 | 25 | public static GenericGenerator getInstance() { 26 | return instance; 27 | } 28 | 29 | @Override 30 | public String generate() { 31 | Random random = getRandomInstance(); 32 | // ContiguousSet sets = ContiguousSet 33 | // .create(Range.closed(622126, 622925), DiscreteDomain.integers()); 34 | // ImmutableList list = sets.asList(); 35 | 36 | Integer prev = 622126 + random.nextInt(925 + 1 - 126); 37 | String bardNo = prev 38 | + StringUtils.leftPad(random.nextInt(999999999) + "", 9, "0"); 39 | 40 | char[] chs = bardNo.trim().toCharArray(); 41 | int luhmSum = 0; 42 | for (int i = chs.length - 1, j = 0; i >= 0; i--, j++) { 43 | int k = chs[i] - '0'; 44 | if (j % 2 == 0) { 45 | k *= 2; 46 | k = k / 10 + k % 10; 47 | } 48 | luhmSum += k; 49 | } 50 | 51 | char checkCode = luhmSum % 10 == 0 ? '0' 52 | : (char) (10 - luhmSum % 10 + '0'); 53 | 54 | return bardNo + checkCode; 55 | } 56 | 57 | public static void main(String args[]){ 58 | String bankCardNo = BankCardNumberGenerator.getInstance().generate(); 59 | System.err.println(bankCardNo); 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/tools/Generator/ChineseAddressGenerator.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.tools.Generator; 2 | 3 | import org.apache.commons.lang3.RandomUtils; 4 | 5 | /** 6 | * 随机生成地址:辽宁省丹东市疙闸护路7388号朽蒲塘小区11单元414室 7 | * */ 8 | public class ChineseAddressGenerator extends GenericGenerator { 9 | private static GenericGenerator instance = new ChineseAddressGenerator(); 10 | 11 | private ChineseAddressGenerator() { 12 | } 13 | 14 | public static GenericGenerator getInstance() { 15 | return instance; 16 | } 17 | 18 | @Override 19 | public String generate() { 20 | StringBuilder result = new StringBuilder(genProvinceAndCity()); 21 | result.append(ChineseCharUtils.genRandomLengthChineseChars(2, 3) + "路"); 22 | result.append(RandomUtils.nextInt(1, 8000) + "号"); 23 | result 24 | .append(ChineseCharUtils.genRandomLengthChineseChars(2, 3) + "小区"); 25 | result.append(RandomUtils.nextInt(1, 20) + "单元"); 26 | result.append(RandomUtils.nextInt(101, 2500) + "室"); 27 | return result.toString(); 28 | } 29 | 30 | /** 31 | * XX路XX小区XX单元XX室 32 | * @return String 33 | * */ 34 | public static String DoorNumber() { 35 | StringBuilder result = new StringBuilder(); 36 | result.append(ChineseCharUtils.genRandomLengthChineseChars(2, 3) + "路"); 37 | result.append(RandomUtils.nextInt(1, 8000) + "号"); 38 | result 39 | .append(ChineseCharUtils.genRandomLengthChineseChars(2, 3) + "小区"); 40 | result.append(RandomUtils.nextInt(1, 20) + "单元"); 41 | result.append(RandomUtils.nextInt(101, 2500) + "室"); 42 | return result.toString(); 43 | } 44 | private static String genProvinceAndCity() { 45 | return ChineseAreaList.provinceCityList.get( 46 | RandomUtils.nextInt(0, ChineseAreaList.provinceCityList.size())); 47 | } 48 | 49 | public static void main(String args[]){ 50 | 51 | String generatedAddress = ChineseAddressGenerator.getInstance().generate(); 52 | System.err.println(generatedAddress); 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/tools/Generator/ChineseCharUtils.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.tools.Generator; 2 | 3 | import java.io.UnsupportedEncodingException; 4 | import java.util.Date; 5 | import java.util.Random; 6 | 7 | public class ChineseCharUtils { 8 | private static Random random = new Random(new Date().getTime()); 9 | 10 | public static String genOneChineseChars() { 11 | String str = null; 12 | int highPos = (176 + Math.abs(random.nextInt(39))); 13 | int lowPos = 161 + Math.abs(random.nextInt(93)); 14 | byte[] b = new byte[] { (new Integer(highPos)).byteValue(), 15 | (new Integer(lowPos)).byteValue() }; 16 | 17 | try { 18 | str = new String(b, "GB2312"); 19 | } catch (UnsupportedEncodingException e) { 20 | e.printStackTrace(); 21 | } 22 | 23 | return str; 24 | } 25 | 26 | public static String genFixedLengthChineseChars(int length) { 27 | String str = ""; 28 | for (int i = length; i > 0; i--) { 29 | str = str + genOneChineseChars(); 30 | } 31 | 32 | return str; 33 | } 34 | 35 | public static String genRandomLengthChineseChars(int start, int end) { 36 | String str = ""; 37 | int length = random.nextInt(end + 1); 38 | if (length < start) { 39 | str = genRandomLengthChineseChars(start, end); 40 | } else { 41 | for (int i = 0; i < length; i++) { 42 | str = str + genOneChineseChars(); 43 | } 44 | } 45 | return str; 46 | } 47 | 48 | public static void main(String args[]) { 49 | System.out.println(genOneChineseChars()); 50 | System.out.println(genFixedLengthChineseChars(20)); 51 | System.out.println(genRandomLengthChineseChars(1, 10)); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/tools/Generator/ChineseMobileNumberGenerator.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.tools.Generator; 2 | 3 | import org.apache.commons.lang3.RandomUtils; 4 | import org.apache.commons.lang3.StringUtils; 5 | 6 | 7 | public class ChineseMobileNumberGenerator extends GenericGenerator { 8 | private static final int[] MOBILE_PREFIX = new int[] { 133, 153, 177, 180, 9 | 181, 189, 134, 135, 136, 137, 138, 139, 150, 151, 152, 157, 158, 159, 10 | 178, 182, 183, 184, 187, 188, 130, 131, 132, 155, 156, 176, 185, 186, 11 | 145, 147, 170 }; 12 | private static GenericGenerator instance = new ChineseMobileNumberGenerator(); 13 | 14 | private ChineseMobileNumberGenerator() { 15 | } 16 | 17 | public static GenericGenerator getInstance() { 18 | return instance; 19 | } 20 | 21 | @Override 22 | public String generate() { 23 | return genMobilePre() + StringUtils 24 | .leftPad("" + RandomUtils.nextInt(0, 99999999 + 1), 8, "0"); 25 | } 26 | 27 | private static String genMobilePre() { 28 | return "" + MOBILE_PREFIX[RandomUtils.nextInt(0, MOBILE_PREFIX.length)]; 29 | } 30 | 31 | public static void main(String args []){ 32 | String generatedMobileNum = ChineseMobileNumberGenerator.getInstance().generate(); 33 | System.err.println(generatedMobileNum); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/tools/Generator/EmailAddressGenerator.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.tools.Generator; 2 | 3 | import org.apache.commons.lang3.RandomStringUtils; 4 | 5 | public class EmailAddressGenerator extends GenericGenerator { 6 | private static GenericGenerator instance = new EmailAddressGenerator(); 7 | 8 | private EmailAddressGenerator() { 9 | } 10 | 11 | public static GenericGenerator getInstance() { 12 | return instance; 13 | } 14 | 15 | @Override 16 | public String generate() { 17 | StringBuilder result = new StringBuilder(); 18 | result.append(RandomStringUtils.randomAlphanumeric(10)); 19 | result.append("@"); 20 | // result.append(RandomStringUtils.randomAlphanumeric(5)); 21 | result.append("gmail.com"); 22 | // result.append("."); 23 | // result.append(RandomStringUtils.randomAlphanumeric(3)); 24 | 25 | return result.toString().toLowerCase(); 26 | } 27 | 28 | public static void main(String args[]){ 29 | String generatedEmail = EmailAddressGenerator.getInstance().generate(); 30 | System.err.println(generatedEmail); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/tools/Generator/GenericGenerator.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.tools.Generator; 2 | 3 | import java.util.Date; 4 | import java.util.Random; 5 | 6 | public abstract class GenericGenerator { 7 | public abstract String generate(); 8 | 9 | private static Random random = null; 10 | 11 | protected Random getRandomInstance() { 12 | if (random == null) { 13 | random = new Random(new Date().getTime()); 14 | } 15 | 16 | return random; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/tools/RecordIP.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.tools; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | 5 | /** 6 | * 记录客户端请求IP 7 | * 可以防止用户使用代理IP 8 | * */ 9 | public class RecordIP { 10 | 11 | /** 12 | * 返回客户端IP 13 | * @param request 14 | * @return String 15 | * */ 16 | public static String getIpAddress(HttpServletRequest request) { 17 | String ip = request.getHeader("x-forwarded-for"); 18 | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { 19 | ip = request.getHeader("Proxy-Client-IP"); 20 | } 21 | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { 22 | ip = request.getHeader("WL-Proxy-Client-IP"); 23 | } 24 | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { 25 | ip = request.getHeader("HTTP_CLIENT_IP"); 26 | } 27 | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { 28 | ip = request.getHeader("HTTP_X_FORWARDED_FOR"); 29 | } 30 | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { 31 | ip = request.getRemoteAddr(); 32 | } 33 | return ip; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/tools/ResponseData.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.tools; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | import com.xiaoniu.model.CaseResultModel; 6 | 7 | 8 | public class ResponseData { 9 | public static Map mpalist=new HashMap(); 10 | 11 | public static Map set(Integer caseId, CaseResultModel caseResultModel){ 12 | mpalist.put(caseId, caseResultModel); 13 | return mpalist; 14 | } 15 | 16 | public static Map getmap(){ 17 | return mpalist; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/tools/listener/ReportUtil.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.tools.listener; 2 | 3 | import org.testng.Reporter; 4 | 5 | import java.util.Calendar; 6 | 7 | public class ReportUtil { 8 | private static String reportName = "自动化测试报告"; 9 | 10 | private static String splitTimeAndMsg = "==="; 11 | 12 | public static void log(String msg) { 13 | long timeMillis = Calendar.getInstance().getTimeInMillis(); 14 | Reporter.log(timeMillis + splitTimeAndMsg + msg, true); 15 | } 16 | 17 | public static String getReportName() { 18 | return reportName; 19 | } 20 | 21 | public static String getSpiltTimeAndMsg() { 22 | return splitTimeAndMsg; 23 | } 24 | 25 | public static void setReportName(String reportName) { 26 | if(StringUtil.isNotEmpty(reportName)){ 27 | ReportUtil.reportName = reportName; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/tools/listener/SpringContextUtils.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.tools.listener; 2 | 3 | import org.springframework.context.ApplicationContext; 4 | import org.springframework.context.ApplicationContextAware; 5 | 6 | /** 7 | * 以静态变量保存Spring ApplicationContext, 可在任何代码任何地方任何时候中取出ApplicaitonContext. 8 | * 9 | */ 10 | public class SpringContextUtils implements ApplicationContextAware { 11 | private static ApplicationContext applicationContext; 12 | 13 | /** 14 | * 实现ApplicationContextAware接口的context注入函数, 将其存入静态变量. 15 | */ 16 | public void setApplicationContext(ApplicationContext applicationContext) { 17 | SpringContextUtils.applicationContext = applicationContext; // NOSONAR 18 | } 19 | 20 | /** 21 | * 取得存储在静态变量中的ApplicationContext. 22 | */ 23 | public static ApplicationContext getApplicationContext() { 24 | checkApplicationContext(); 25 | return applicationContext; 26 | } 27 | 28 | /** 29 | * 从静态变量ApplicationContext中取得Bean, 自动转型为所赋值对象的类型. 30 | */ 31 | @SuppressWarnings("unchecked") 32 | public static T getBean(String name) { 33 | checkApplicationContext(); 34 | return (T) applicationContext.getBean(name); 35 | } 36 | 37 | /** 38 | * 从静态变量ApplicationContext中取得Bean, 自动转型为所赋值对象的类型. 39 | */ 40 | @SuppressWarnings("unchecked") 41 | public static T getBean(Class clazz) { 42 | checkApplicationContext(); 43 | return (T) applicationContext.getBean(clazz); 44 | } 45 | 46 | /** 47 | * 清除applicationContext静态变量. 48 | */ 49 | public static void cleanApplicationContext() { 50 | applicationContext = null; 51 | } 52 | 53 | private static void checkApplicationContext() { 54 | if (applicationContext == null) { 55 | throw new IllegalStateException("applicaitonContext未注入"); 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /src/main/java/com/xiaoniu/tools/listener/StringUtil.java: -------------------------------------------------------------------------------- 1 | package com.xiaoniu.tools.listener; 2 | 3 | public class StringUtil { 4 | public static boolean isNotEmpty(String str) { 5 | return null != str && !"".equals(str); 6 | } 7 | 8 | public static boolean isEmpty(String str) { 9 | return null == str || "".equals(str); 10 | } 11 | 12 | /** 13 | * 14 | * @param sourceStr 待替换字符串 15 | * @param matchStr 匹配字符串 16 | * @param replaceStr 目标替换字符串 17 | * @return 18 | */ 19 | public static String replaceFirst(String sourceStr,String matchStr,String replaceStr){ 20 | int index = sourceStr.indexOf(matchStr); 21 | int matLength = matchStr.length(); 22 | int sourLength = sourceStr.length(); 23 | String beginStr = sourceStr.substring(0,index); 24 | String endStr = sourceStr.substring(index+matLength,sourLength); 25 | sourceStr = beginStr+replaceStr+endStr; 26 | return sourceStr; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/resources/config.properties: -------------------------------------------------------------------------------- 1 | mail_user:zhangsan 2 | mail_pwd:123456 3 | mail_to:385400188@qq.com; 4 | mail_cc:283453282@qq.com; 5 | linux_IP:172.20.20.215 6 | svn_user:zhangsan 7 | svn_passwd:123456 -------------------------------------------------------------------------------- /src/main/resources/jdbc.properties: -------------------------------------------------------------------------------- 1 | jdbc.driverClass=com.mysql.jdbc.Driver 2 | jdbc.url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8 3 | jdbc.username=root 4 | jdbc.password=123456 5 | -------------------------------------------------------------------------------- /src/main/resources/mapper/API/APICaseMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | and f_api_case.id = #{id} 11 | 12 | 13 | and f_api_case.caseName like "%"#{caseName}"%" 14 | 15 | 16 | and f_api_case.APIId = #{APIId} 17 | 18 | 19 | 20 | 26 | 27 | 30 | 31 | 32 | INSERT into f_api_case(caseData,caseName,APIId,caseAssert,caseParam,remark,createTime) 33 | values(#{caseData},#{caseName},#{APIId},#{caseAssert},#{caseParam},#{remark},NOW()); 34 | 35 | 36 | 37 | update f_api_case set caseData=#{caseData},caseName=#{caseName},APIId=#{APIId},caseAssert=#{caseAssert},caseParam=#{caseParam},remark=#{remark},updateTime=NOW() 38 | where id=#{id} 39 | 40 | 41 | 42 | delete from f_api_case where id=#{id} 43 | 44 | -------------------------------------------------------------------------------- /src/main/resources/mapper/API/APICaseRelationMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | insert into f_api_case_relattion(caseId,APIId,caseData,caseAssert,caseParam,createTime) values(#{caseId},#{APIId},#{caseData},#{caseAssert},#{caseParam},NOW()) 9 | 10 | 14 | 15 | 19 | 20 | 21 | delete from f_api_case_relattion where caseId=#{caseId} 22 | 23 | -------------------------------------------------------------------------------- /src/main/resources/mapper/API/APIMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | and f_api.id = #{id} 11 | 12 | 13 | and f_api.apiName like "%"#{apiName}"%" 14 | 15 | 16 | and f_api.apiMethod like "%"#{apiMethod}"%" 17 | 18 | 19 | and f_api.apiStatus = #{apiStatus} 20 | 21 | 22 | 23 | 24 | 30 | 31 | 34 | 35 | 36 | delete from f_api where id=#{id} 37 | 38 | 39 | 40 | INSERT into f_api(apiName,apiHost,apiUrl,apiMethod,apiHeaders,apiParams,apiStatus,remark) 41 | values(#{apiName},#{apiHost},#{apiUrl},#{apiMethod},#{apiHeaders},#{apiParams},#{apiStatus},#{remark}) 42 | 43 | 44 | 45 | update f_api set apiName=#{apiName},apiHost=#{apiHost},apiUrl=#{apiUrl},apiMethod=#{apiMethod},apiHeaders=#{apiHeaders},apiParams=#{apiParams},apiStatus=#{apiStatus},remark=#{remark},updateTime=NOW() 46 | where id=#{id} 47 | 48 | -------------------------------------------------------------------------------- /src/main/resources/mapper/API/APIResultMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | and caseId=#{caseId} 10 | 11 | 12 | and setId=#{setId} 13 | 14 | 15 | and batch=#{batch} 16 | 17 | 18 | 19 | 22 | 23 | 26 | 27 | 33 | 34 | 35 | insert into f_api_result(caseId,APIId,relationId,setId,startTime,endTime,costTime,request,statusCode,response,batch,createTime) 36 | values(#{caseId},#{APIId},#{relationId},#{setId},#{startTime},#{endTime},#{costTime},#{request},#{statusCode},#{response},#{batch},NOW()); 37 | 38 | -------------------------------------------------------------------------------- /src/main/resources/mapper/API/CaseResultMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | and batch=#{batch} 12 | 13 | 14 | and resultStatus like "%"#{resultStatus}"%" 15 | 16 | 17 | 18 | 21 | 22 | 28 | 29 | 30 | INSERT into f_case_result(caseId,setId,startTime,endTime,costTime,resultStatus,runEnv,batch,createTime) 31 | values(#{caseId},#{setId},#{startTime},#{endTime},#{costTime},#{resultStatus},#{runEnv},#{batch},NOW()); 32 | 33 | 34 | 35 | update f_case_result set startTime=#{startTime},endTime=#{endTime},costTime=#{costTime},resultStatus=#{resultStatus},updateTime=NOW() 36 | where caseId=#{caseId} 37 | 38 | -------------------------------------------------------------------------------- /src/main/resources/mapper/Env/EnvInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | and f_env_list.id = #{id} 9 | 10 | 11 | and f_env_list.envTitle = #{envTitle} 12 | 13 | 14 | and f_env_list.envDomain = #{envDomain} 15 | 16 | 17 | and f_env_list.envIp = #{envIp} 18 | 19 | 20 | 21 | 22 | 23 | insert into f_env_list(envTitle,envDomain,envIp,createTime) values(#{envTitle},#{envDomain},#{envIp},NOW()) 24 | 25 | 26 | 27 | delete from f_env_list where id=#{id} 28 | 29 | 30 | 33 | 34 | 40 | 41 | 47 | 48 | 51 | -------------------------------------------------------------------------------- /src/main/resources/mapper/Env/EnvVarMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | and f_api.id = #{id} 10 | 11 | 12 | and f_var.varName like "%"#{varName}"%" 13 | 14 | 15 | and f_var.varType = #{varType} 16 | 17 | 18 | 19 | 20 | INSERT into f_var(varName,varValue,varType,createTime) 21 | values(#{varName},#{varValue},#{varType},NOW()) 22 | 23 | 24 | 25 | delete from f_var where id=#{id} 26 | 27 | 28 | 29 | update f_var set varName=#{varName},varValue=#{varValue},updateTime=NOW() 30 | where id=#{id} 31 | 32 | 33 | 39 | 40 | 43 | 44 | 47 | 48 | -------------------------------------------------------------------------------- /src/main/resources/mapper/Env/TempVarMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | INSERT into f_var_temp(varName,varRule,varValue) 9 | values(#{varName},#{varRule},#{varValue}) 10 | 11 | 12 | 15 | 16 | 17 | truncate table f_var_temp; 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/resources/spring/spring-service.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/resources/testng.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/API/result.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ include file="../taglibs.jsp" %> 4 | 5 | 6 | 7 | 8 | 9 | 响应结果 10 | 11 | 12 | ${response} 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/Env/addVar.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ include file="../taglibs.jsp" %> 4 | 5 | 6 | 7 | 8 | 9 | 新增变量页面 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 |
21 |
添加变量
22 | 变量名: 23 | 24 | 变量值: 25 | 26 | 27 | 返回 28 |
29 |
30 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/Env/editVar.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ include file="../taglibs.jsp" %> 4 | 5 | 6 | 7 | 8 | 9 | 编辑变量页面 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 |
21 |
编辑变量
22 | 23 | 变量名: 24 | 25 | 变量值: 26 | 27 | 28 | 返回 29 |
30 |
31 |
32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/User/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ include file="../taglibs.jsp" %> 4 | 5 | 6 | 7 | 8 | 在线接口测试平台 9 | 10 | <%-- --%> 11 | 12 | 13 | 14 | 15 | 42 | 43 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/err.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | 4 | 5 | 6 | 7 | 跳转页面 8 | 9 | 10 |

${message}

11 | 12 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/taglibs.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 2 | <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 3 | <%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %> 4 | <% 5 | String path = request.getContextPath(); 6 | String basePath = request.getScheme() + "://" 7 | + request.getServerName() + ":" + request.getServerPort() 8 | + path + "/"; 9 | String LoginuserName= (String)request.getSession().getAttribute("LoginuserName"); 10 | request.setAttribute("ctx", request.getContextPath()); 11 | request.setAttribute("basePath",basePath); 12 | request.setAttribute("LoginuserName",LoginuserName); 13 | %> -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/upload.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme() + "://" 6 | + request.getServerName() + ":" + request.getServerPort() 7 | + path + "/"; 8 | %> 9 | 10 | 11 | 12 | 13 | 14 | 上传文件 15 | 16 | 17 |

上传1个文件

18 | 19 |
20 | 21 | 上传文件: 22 | 23 |
24 | 25 | 26 |
27 |

上传多个文件

28 |
29 | 30 | 上传文件1: 31 | 32 | 上传文件2: 33 | 34 | 上传文件3: 35 | 36 |
37 |
38 | 39 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/lib/bravo-core.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/WEB-INF/lib/bravo-core.jar -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/lib/xnol-loan.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/WEB-INF/lib/xnol-loan.jar -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | CharacterEncodingFilter 8 | org.springframework.web.filter.CharacterEncodingFilter 9 | 10 | encoding 11 | utf-8 12 | 13 | 14 | 15 | CharacterEncodingFilter 16 | /* 17 | 18 | 19 | default 20 | *.js 21 | *.css 22 | /bootstrap/* 23 | /image/* 24 | 25 | 26 | APIPlatform 27 | org.springframework.web.servlet.DispatcherServlet 28 | 29 | contextConfigLocation 30 | classpath:spring/spring-*.xml 31 | 32 | 1 33 | 34 | 35 | APIPlatform 36 | / 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/3.2.0/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/bootstrap/3.2.0/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/3.2.0/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/bootstrap/3.2.0/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/3.2.0/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/bootstrap/3.2.0/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/3.2.0/js/bootstrap-datepicker.zh-CN.min.js: -------------------------------------------------------------------------------- 1 | !function(a){a.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],daysShort:["周日","周一","周二","周三","周四","周五","周六"],daysMin:["日","一","二","三","四","五","六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",clear:"清除",format:"yyyy年mm月dd日",titleFormat:"yyyy年mm月",weekStart:1}}(jQuery); -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/3.3.7/js/bootstrap-datepicker.zh-CN.min.js: -------------------------------------------------------------------------------- 1 | !function(a){a.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],daysShort:["周日","周一","周二","周三","周四","周五","周六"],daysMin:["日","一","二","三","四","五","六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",clear:"清除",format:"yyyy年mm月dd日",titleFormat:"yyyy年mm月",weekStart:1}}(jQuery); -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/3.3.7/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /src/main/webapp/bootstrap/ReadMe.txt: -------------------------------------------------------------------------------- 1 | 1.下载插件: 2 | https://github.com/uxsolutions/bootstrap-datepicker 3 | 2.加载插件: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 3.添加标签: 12 | 上线日期: 13 | 4.增加函数: 14 | 23 | 24 | 25 | 5.select 标签使用 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
参数名取值方式规则操作
42 | -------------------------------------------------------------------------------- /src/main/webapp/css/home.css: -------------------------------------------------------------------------------- 1 | html { 2 | /* background-color: #f2f5f7; */ 3 | background-color: #1E90FF; 4 | } 5 | .navbar-static-top { 6 | background-color: #1E90FF; 7 | } 8 | .navbar-brand { 9 | /* background: url('') no-repeat 10px 8px; */ 10 | display: inline-block; 11 | vertical-align: middle; 12 | color: white; 13 | } 14 | #container { 15 | margin-left: 0px; 16 | position: absolute; 17 | box-sizing: border-box; 18 | width: 100%; 19 | height: 100%; 20 | /* background: #4d5e70; */ 21 | background: #f2f5f7; 22 | } 23 | 24 | #links { 25 | color: #6666CC 26 | } -------------------------------------------------------------------------------- /src/main/webapp/css/mail/insert.css: -------------------------------------------------------------------------------- 1 | .level{ 2 | background-color: #f4f4f4; 3 | border-bottom: solid 1px #bcbcbc; 4 | width: 100%; 5 | height: 40px; 6 | margin: 2px; 7 | position: relative; 8 | } 9 | .level img{ 10 | position: absolute; 11 | top: 6px; 12 | left: 10px; 13 | } 14 | .level .txt{ 15 | height: 28px; 16 | position: absolute; 17 | top: 9px; 18 | left: 40px; 19 | } 20 | .content form table{ 21 | margin: 30px 0 0 40px; 22 | border-collapse: collapse; 23 | } 24 | .content form table tr td{ 25 | height: 40px; 26 | background-color: white; 27 | border: solid 1px #e4e3dc; 28 | } 29 | .content form table tr .title{ 30 | width: 100px; 31 | text-align: center; 32 | font-size: 15px; 33 | line-height: 40px; 34 | mso-cellspacing: 0; 35 | } 36 | .content form table tr .edit{ 37 | width: 363px; 38 | margin-right:500px; 39 | text-align: left; 40 | padding-left: 20px; 41 | } 42 | .content form table tr .edit .text{ 43 | height: 25px; 44 | line-height: 25px; 45 | padding-left: 10px; 46 | } 47 | .content #save{ 48 | color: white; 49 | background-color: #41e5a0; 50 | border: solid 1px #000000; 51 | border-radius: 6px; 52 | -moz-border-radius: 6px; 53 | -webkit-border-radius: 6px; 54 | padding: 8px 15px; 55 | margin-left: 170px; 56 | margin-top: 30px; 57 | } 58 | .content #reset{ 59 | background-color: white; 60 | border: solid 1px black; 61 | border-radius: 6px; 62 | -moz-border-radius: 6px; 63 | -webkit-border-radius: 6px; 64 | padding: 8px 15px; 65 | margin-left: 100px; 66 | margin-top: 30px; 67 | } -------------------------------------------------------------------------------- /src/main/webapp/css/mainframe.css: -------------------------------------------------------------------------------- 1 | body { 2 | width: 100%; 3 | height: 100%; 4 | margin: 0; 5 | overflow: hidden; 6 | background-color: #FFFFFF; 7 | font-family: "Microsoft YaHei", sans-serif; 8 | } 9 | .navbar.navbar-inverse { 10 | background-color: #1E90FF; 11 | } 12 | .text-center { 13 | background-color: #1E90FF; 14 | } 15 | .pageSidebar{ 16 | width: 240px; 17 | height:100%; 18 | padding-bottom: 30px; 19 | overflow: auto; 20 | background-color: aliceblue; 21 | } 22 | .splitter { 23 | width: 5px; 24 | height: 100%; 25 | bottom: 0; 26 | left: 240px; 27 | position: absolute; 28 | overflow: hidden; 29 | background-color: #fff; 30 | } 31 | .pageContent{ 32 | height: 100%; 33 | min-width: 768px; 34 | left: 246px; 35 | top: 0; 36 | right: 0; 37 | z-index: 3; 38 | padding-bottom: 30px; 39 | position: absolute; 40 | } 41 | .pageContainer{ 42 | bottom: 0; 43 | left:0; 44 | right: 0; 45 | top: 53px; 46 | overflow: auto; 47 | position: absolute; 48 | width: 100%; 49 | } 50 | .footer { 51 | width: 100%; 52 | height: 30px; 53 | line-height: 30px; 54 | margin-top: 0; 55 | left: 0; 56 | right: 0; 57 | bottom: 0; 58 | position: absolute; 59 | z-index: 10; 60 | background-color:#DFDFDF; 61 | } 62 | .navbar-collapse{ 63 | padding-left: 5px; 64 | padding-right: 5px; 65 | } 66 | a#links{ 67 | color:black; 68 | margin: 0 5px; 69 | } 70 | .nav-header.collapsed{ 71 | color:black; 72 | } 73 | .nav-pills>li.active>a, .nav-pills>li.active>a:focus, .nav-pills>li.active>a:hover{ 74 | background-color: #222222; 75 | } 76 | .dropdown-menu>li>a{ 77 | padding: 10px 15px; 78 | } -------------------------------------------------------------------------------- /src/main/webapp/css/public.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: Lato, Helvetica, Arial, sans-serif; 5 | font-size: 14px; 6 | line-height: 1.72222; 7 | color: #34495e; 8 | background-color: #fff; 9 | } 10 | 11 | .wrap { 12 | min-width: 100%; 13 | position: absolute; 14 | background: #eff3f6 bottom; 15 | min-height: 100%; 16 | overflow: hidden; 17 | } 18 | 19 | .left { 20 | margin-left: 0px; 21 | position: absolute; 22 | box-sizing: border-box; 23 | width: 200px; 24 | height: 100%; 25 | background: #4d5e70 bottom; 26 | } 27 | 28 | .logoDiv { 29 | padding-top: 20px; 30 | padding-bottom: 20px; 31 | height: 70px; 32 | background-color: #354457; 33 | font-size: 17px; 34 | color: #fff; 35 | vertical-align: bottom; 36 | } 37 | 38 | .logoTitle { 39 | margin-left: 15px; 40 | line-height: 1.7; 41 | } 42 | . 43 | .menu-title { 44 | margin-left: 15px; 45 | color: #828e9a; 46 | padding-top: 10px; 47 | padding-bottom: 10px; 48 | font-size: 14px; 49 | font-weight: bold; 50 | } 51 | .menu-item { 52 | padding-left: 15px; 53 | line-height: 40px; 54 | height: 40px; 55 | color: #aab1b7; 56 | cursor: pointer; 57 | width: 200px; 58 | overflow:hidden; 59 | } 60 | 61 | .menu-item-active { 62 | background-color: #3d4e60; 63 | border-right: 4px solid #647f9d; 64 | color: #fff; 65 | } 66 | 67 | .right { 68 | box-sizing: border-box; 69 | float: left; 70 | box-sizing: border-box; 71 | padding-left: 200px; 72 | overflow-y: overlay; 73 | overflow-x: hidden; 74 | clear: both; 75 | color: #717592; 76 | min-width: 100%; 77 | min-height: 500px; 78 | } -------------------------------------------------------------------------------- /src/main/webapp/css/table-td.css: -------------------------------------------------------------------------------- 1 | .data-table tr td { 2 | text-overflow: ellipsis; /* for IE */ 3 | -moz-text-overflow: ellipsis; /* for Firefox,mozilla */ 4 | overflow: hidden; 5 | white-space: nowrap; 6 | } -------------------------------------------------------------------------------- /src/main/webapp/css/user/register.css: -------------------------------------------------------------------------------- 1 | .errstyle { 2 | color: red; 3 | } 4 | b { 5 | color: red; 6 | font-weight: bolder; 7 | } 8 | body { 9 | background-image: url("../../image/blue.jpg"); 10 | background-attachment: fixed; 11 | background-repeat: no-repeat; 12 | background-size: cover; 13 | } -------------------------------------------------------------------------------- /src/main/webapp/echarts-2.2.7/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/echarts-2.2.7/.DS_Store -------------------------------------------------------------------------------- /src/main/webapp/html/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |

欢迎来到在线接口测试平台

8 |
9 | 10 | -------------------------------------------------------------------------------- /src/main/webapp/image/API.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/API.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/blue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/blue.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/platform/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/1.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/10.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/11.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/12.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/13.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/14.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/15.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/16.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/17.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/18.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/19.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/2.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/20.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/3.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/4.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/5.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/6.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/7.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/8.png -------------------------------------------------------------------------------- /src/main/webapp/image/platform/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/platform/9.png -------------------------------------------------------------------------------- /src/main/webapp/image/user/login-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/user/login-img.png -------------------------------------------------------------------------------- /src/main/webapp/image/user/login_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/image/user/login_logo.png -------------------------------------------------------------------------------- /src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/webapp/js/api/apiRelations.js: -------------------------------------------------------------------------------- 1 | function htmlEscape(text){ 2 | return text.replace(/[<>"&]/g, function(match, pos, originalText){ 3 | switch(match){ 4 | case "\"":return "\\\""; 5 | } 6 | }); 7 | } 8 | function getAPIRelations(){ 9 | var rows=$("#API_table tr[id='row_api']"); 10 | var APIRelations="["; 11 | var lengths=rows.length; 12 | rows.each(function (index){ 13 | var api="{"; 14 | // console.info();$(this).find("td#APIName").html(); 15 | var APIId=$(this).find("td#APIId").html(); 16 | api=api+"\"APIId\":\""+APIId+"\","; 17 | var APIName=$(this).find("td#APIName").html(); 18 | api=api+"\"APIName\":\""+APIName+"\","; 19 | var caseData=$(this).find("td#caseData").html(); 20 | //判断特殊字符进行转义 21 | api=api+"\"caseData\":\""+htmlEscape(caseData)+"\","; 22 | var caseAssert=$(this).find("td#caseAssert").html(); 23 | api=api+"\"caseAssert\":\""+htmlEscape(caseAssert)+"\","; 24 | var caseParam=$(this).find("td#caseParam").html(); 25 | api=api+"\"caseParam\":\""+htmlEscape(caseParam)+"\"}"; 26 | 27 | //如果是最后1个不需要加,号 28 | if(index !=(lengths-1)){ 29 | APIRelations=APIRelations+api+","; 30 | }else{ 31 | APIRelations=APIRelations+api; 32 | } 33 | }); 34 | APIRelations=APIRelations+"]"; 35 | //console.info(APIRelations); 36 | return APIRelations 37 | } -------------------------------------------------------------------------------- /src/main/webapp/js/common.js: -------------------------------------------------------------------------------- 1 | //参考文献:https://www.cnblogs.com/lideqiang/p/5667576.html 2 | function get_url(url){ 3 | $.ajax( { 4 | type : "get", 5 | success :function(response) { 6 | } 7 | }); 8 | window.open(url); 9 | } 10 | //post成功打开一个新的浏览器窗口 11 | function post_submit(action,PARAMTERS) { 12 | var temp_form = document.createElement("form"); 13 | temp_form.id = "form1"; 14 | temp_form.name = "form1"; 15 | temp_form .action = action; 16 | temp_form .target = "_blank"; 17 | temp_form .method = "post"; 18 | temp_form .style.display = "none"; 19 | 20 | //添加参数 21 | for (var item in PARAMTERS) { 22 | var opt = document.createElement("input"); 23 | opt.type="hidden"; 24 | opt.name = PARAMTERS[item].name; 25 | opt.value = PARAMTERS[item].value; 26 | temp_form.appendChild(opt); 27 | } 28 | document.body.appendChild(temp_form); 29 | temp_form .submit(); 30 | } 31 | -------------------------------------------------------------------------------- /src/main/webapp/js/main.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var $confirm; 3 | 4 | $confirm = null; 5 | 6 | $(function() { 7 | var $createDestroy, $window, sectionTop; 8 | $window = $(window); 9 | sectionTop = $(".top").outerHeight() + 20; 10 | $createDestroy = $("#switch-create-destroy"); 11 | hljs.initHighlightingOnLoad(); 12 | $("a[href*=\"#\"]").on("click", function(event) { 13 | var $target; 14 | event.preventDefault(); 15 | $target = $($(this).attr("href").slice("#")); 16 | if ($target.length) { 17 | return $window.scrollTop($target.offset().top - sectionTop); 18 | } 19 | }); 20 | $("input[type=\"checkbox\"], input[type=\"radio\"]").not("[data-switch-no-init]").bootstrapSwitch(); 21 | $("[data-switch-get]").on("click", function() { 22 | var type; 23 | type = $(this).data("switch-get"); 24 | return alert($("#switch-" + type).bootstrapSwitch(type)); 25 | }); 26 | $("[data-switch-set]").on("click", function() { 27 | var type; 28 | type = $(this).data("switch-set"); 29 | return $("#switch-" + type).bootstrapSwitch(type, $(this).data("switch-value")); 30 | }); 31 | $("[data-switch-toggle]").on("click", function() { 32 | var type; 33 | type = $(this).data("switch-toggle"); 34 | return $("#switch-" + type).bootstrapSwitch("toggle" + type.charAt(0).toUpperCase() + type.slice(1)); 35 | }); 36 | $("[data-switch-set-value]").on("input", function(event) { 37 | var type, value; 38 | event.preventDefault(); 39 | type = $(this).data("switch-set-value"); 40 | value = $.trim($(this).val()); 41 | if ($(this).data("value") === value) { 42 | return; 43 | } 44 | return $("#switch-" + type).bootstrapSwitch(type, value); 45 | }); 46 | $("[data-switch-create-destroy]").on("click", function() { 47 | var isSwitch; 48 | isSwitch = $createDestroy.data("bootstrap-switch"); 49 | $createDestroy.bootstrapSwitch((isSwitch ? "destroy" : null)); 50 | return $(this).button((isSwitch ? "reset" : "destroy")); 51 | }); 52 | return $confirm = $("#confirm").bootstrapSwitch({ 53 | size: "large", 54 | onSwitchChange: function(event, state) { 55 | event.preventDefault(); 56 | return console.log(state, event.isDefaultPrevented()); 57 | } 58 | }); 59 | }); 60 | 61 | }).call(this); 62 | -------------------------------------------------------------------------------- /src/main/webapp/js/user/page_login.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $("#user").blur(function(){ 3 | if($(this).val().length == 0) { 4 | $("#erroruser").html("登陆名不为空"); 5 | // alert("登陆名不为空"); 6 | } 7 | }); 8 | $("#userPwd").blur(function() { 9 | if($(this).val().length == 0) { 10 | $("#erroruserPwd").html("密码不为空"); 11 | // alert("密码不为空"); 12 | } 13 | }); 14 | }); 15 | 16 | -------------------------------------------------------------------------------- /src/main/webapp/js/user/page_regist.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $("#user").blur(function(){ 3 | if($(this).val().length == 0) { 4 | $("#erroruser").html("登陆名不为空"); 5 | a=false; 6 | } 7 | else{ 8 | var reg = /^[0-9a-zA-Z]{4,10}$/; 9 | if(!reg.test($(this).val())) { 10 | $("#erroruser").html("4-10个英文字母或数字"); 11 | a=false; 12 | } 13 | else{ 14 | $("#erroruser").html(""); 15 | a=true; 16 | } 17 | } 18 | }); 19 | $("#userPwd").blur(function() { 20 | if($(this).val().length == 0) { 21 | $("#errorpassword").html("密码不为空"); 22 | b=false; 23 | } 24 | else{ 25 | var reg = /^[0-9a-zA-Z]{6,15}$/; 26 | if(!reg.test($(this).val())) { 27 | $("#errorpassword").html("6-15个英文字母或数字"); 28 | b=false; 29 | } 30 | else{ 31 | $("#errorpassword").html(""); 32 | b=true; 33 | } 34 | } 35 | }); 36 | $("#userName").blur(function() { 37 | if($(this).val().length == 0) { 38 | $("#erroruserName").html("名字不为空"); 39 | b=false; 40 | } 41 | }); 42 | $("#email").blur(function() { 43 | if($(this).val().length == 0) { 44 | $("#erroremail").html("电子邮箱不为空"); 45 | d=false; 46 | } 47 | else{ 48 | var reg=/^\w+@\w+(.\w+)+$/; 49 | if(!reg.test($(this).val())) { 50 | $("#erroremail").html("电子邮箱格式错误"); 51 | d=false; 52 | } 53 | else{ 54 | $("#erroremail").html(""); 55 | d=true; 56 | } 57 | } 58 | }); 59 | 60 | }); 61 | 62 | -------------------------------------------------------------------------------- /src/main/webapp/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luozhuwang/APIPlatform/089d7d00ce4860e7a15170d11966ec8ae2c62c2c/src/main/webapp/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/vendor/datatables-plugins/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2014 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(){var f=function(c,b){c.extend(!0,b.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-6'i><'col-sm-6'p>>",renderer:"bootstrap"});c.extend(b.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});b.ext.renderer.pageButton.bootstrap=function(g,f,p,k,h,l){var q=new b.Api(g),r=g.oClasses,i=g.oLanguage.oPaginate,d,e,o=function(b,f){var j,m,n,a,k=function(a){a.preventDefault(); 6 | c(a.currentTarget).hasClass("disabled")||q.page(a.data.action).draw(!1)};j=0;for(m=f.length;j",{"class":r.sPageButton+" "+ 7 | e,"aria-controls":g.sTableId,tabindex:g.iTabIndex,id:0===p&&"string"===typeof a?g.sTableId+"_"+a:null}).append(c("",{href:"#"}).html(d)).appendTo(b),g.oApi._fnBindAction(n,{action:a},k))}};o(c(f).empty().html('