From 9d755af66f3564124e0a6e9d0c6785d16373812d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=84=E6=B5=B7?= <10402852@qq.com>
Date: Mon, 4 Nov 2024 10:41:22 +0800
Subject: [PATCH] 'commit'
---
Doc/v1.0/.cache.json | 1 +
Doc/v1.0/YunNanDsBase-v1.0-api-docs.json | 62 ++++
Doc/v1.0/apidoc.log.lck | 0
...ase_Res_Controller_ResourceController.html | 199 ++++++++++++
Doc/v1.0/index.html | 119 +++++++
Doc/v1.0/style.css | 300 ++++++++++++++++++
.../Controller/DataEaseController.java | 1 -
.../Res/Controller/ResourceController.java | 3 +-
8 files changed, 682 insertions(+), 3 deletions(-)
create mode 100644 Doc/v1.0/.cache.json
create mode 100644 Doc/v1.0/YunNanDsBase-v1.0-api-docs.json
delete mode 100644 Doc/v1.0/apidoc.log.lck
create mode 100644 Doc/v1.0/com_dsideal_base_Res_Controller_ResourceController.html
create mode 100644 Doc/v1.0/index.html
create mode 100644 Doc/v1.0/style.css
diff --git a/Doc/v1.0/.cache.json b/Doc/v1.0/.cache.json
new file mode 100644
index 00000000..49a3c042
--- /dev/null
+++ b/Doc/v1.0/.cache.json
@@ -0,0 +1 @@
+[{"baseUrl":"","className":"ResourceController","description":"ResourceController","docFileName":"com_dsideal_base_Res_Controller_ResourceController.html","generateDocs":true,"packageName":"com.dsideal.base.Res.Controller","requestNodes":[{"changeFlag":0,"codeFileUrl":"com_dsideal_base_Res_Controller_ResourceController.html#getZskPage","deprecated":false,"description":"获取知识库分页数据","header":[],"method":["GET","POST"],"methodName":"getZskPage","paramNodes":[{"description":"文档类型,1:文档 (word,ppt,pdf等),2:数据库(excel)","jsonBody":false,"name":"type_id","required":false,"type":"int"},{"description":"搜索关键词","jsonBody":false,"name":"keyword","required":false,"type":"string"},{"description":"第几页","jsonBody":false,"name":"pageNum","required":false,"type":"int"},{"description":"每页几条","jsonBody":false,"name":"pageSize","required":false,"type":"int"}],"responseNode":{"childNodes":[],"className":"","list":false,"showFieldNotNull":false},"url":"/res/getZskPage"},{"changeFlag":0,"codeFileUrl":"com_dsideal_base_Res_Controller_ResourceController.html#uploadZskDocument","deprecated":false,"description":"上传知识库文档","header":[],"method":["GET","POST"],"methodName":"uploadZskDocument","paramNodes":[],"responseNode":{"childNodes":[],"className":"","list":false,"showFieldNotNull":false},"url":"/res/uploadZskDocument"},{"changeFlag":0,"codeFileUrl":"com_dsideal_base_Res_Controller_ResourceController.html#delZskDocument","deprecated":false,"description":"删除知识库文档","header":[],"method":["GET","POST"],"methodName":"delZskDocument","paramNodes":[{"description":"知识库文档ID","jsonBody":false,"name":"id","required":false,"type":"int"}],"responseNode":{"childNodes":[],"className":"","list":false,"showFieldNotNull":false},"url":"/res/delZskDocument"}],"srcFileName":"D:\\dsWork\\YunNanDsBase\\src\\main\\java\\com\\dsideal\\base\\Res\\Controller\\ResourceController.java"}]
\ No newline at end of file
diff --git a/Doc/v1.0/YunNanDsBase-v1.0-api-docs.json b/Doc/v1.0/YunNanDsBase-v1.0-api-docs.json
new file mode 100644
index 00000000..786f37c8
--- /dev/null
+++ b/Doc/v1.0/YunNanDsBase-v1.0-api-docs.json
@@ -0,0 +1,62 @@
+{
+ "item": [
+ {
+ "request": {
+ "method": "GET",
+ "url": {
+ "query": [
+ {
+ "description": "文档类型,1:文档 (word,ppt,pdf等),2:数据库(excel)",
+ "value": "",
+ "key": "type_id"
+ },
+ {
+ "description": "搜索关键词",
+ "value": "",
+ "key": "keyword"
+ },
+ {
+ "description": "第几页",
+ "value": "",
+ "key": "pageNum"
+ },
+ {
+ "description": "每页几条",
+ "value": "",
+ "key": "pageSize"
+ }
+ ],
+ "raw": "{{domain}}/res/getZskPage"
+ }
+ },
+ "name": "获取知识库分页数据"
+ },
+ {
+ "request": {
+ "method": "POST",
+ "url": {
+ "query": [],
+ "raw": "{{domain}}/res/uploadZskDocument"
+ }
+ },
+ "name": "上传知识库文档"
+ },
+ {
+ "request": {
+ "method": "POST",
+ "url": {
+ "query": [
+ {
+ "description": "知识库文档ID",
+ "value": "",
+ "key": "id"
+ }
+ ],
+ "raw": "{{domain}}/res/delZskDocument"
+ }
+ },
+ "name": "删除知识库文档"
+ }
+ ],
+ "name": "ResourceController"
+}
\ No newline at end of file
diff --git a/Doc/v1.0/apidoc.log.lck b/Doc/v1.0/apidoc.log.lck
deleted file mode 100644
index e69de29b..00000000
diff --git a/Doc/v1.0/com_dsideal_base_Res_Controller_ResourceController.html b/Doc/v1.0/com_dsideal_base_Res_Controller_ResourceController.html
new file mode 100644
index 00000000..4d2c83de
--- /dev/null
+++ b/Doc/v1.0/com_dsideal_base_Res_Controller_ResourceController.html
@@ -0,0 +1,199 @@
+
+
+
+
+
+ ResourceController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ResourceController
+
+
+
+
+
+
+
+
+
+
+
+
+
请求URL
+
+ /res/getZskPage
+ GET
+ POST
+
+
请求参数 application/x-www-form-urlencoded
+
+
+ 参数名 |
+ 类型 |
+ 必须 |
+ 描述 |
+
+
+ type_id |
+ int |
+ 否 |
+ 文档类型,1:文档 (word,ppt,pdf等),2:数据库(excel) |
+
+
+ keyword |
+ string |
+ 否 |
+ 搜索关键词 |
+
+
+ pageNum |
+ int |
+ 否 |
+ 第几页 |
+
+
+ pageSize |
+ int |
+ 否 |
+ 每页几条 |
+
+
+
返回结果
+
{}
+
+
+
+
+
请求URL
+
+ /res/uploadZskDocument
+ GET
+ POST
+
+
返回结果
+
{}
+
+
+
+
+
请求URL
+
+ /res/delZskDocument
+ GET
+ POST
+
+
请求参数 application/x-www-form-urlencoded
+
+
+ 参数名 |
+ 类型 |
+ 必须 |
+ 描述 |
+
+
+ id |
+ int |
+ 否 |
+ 知识库文档ID |
+
+
+
返回结果
+
{}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Doc/v1.0/index.html b/Doc/v1.0/index.html
new file mode 100644
index 00000000..73ae13a6
--- /dev/null
+++ b/Doc/v1.0/index.html
@@ -0,0 +1,119 @@
+
+
+
+
+
+ YunNanDsBaseAPI Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ResourceController
+
+
+
+
+
+
+
+
+
+
+

+
本文档由JApiDocs生成
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Doc/v1.0/style.css b/Doc/v1.0/style.css
new file mode 100644
index 00000000..81f04a60
--- /dev/null
+++ b/Doc/v1.0/style.css
@@ -0,0 +1,300 @@
+body, html {
+ height: 100%;
+}
+
+.book{
+ position: relative;
+ width: 100%;
+ height: 100%;
+}
+
+.book.with-summary .book-summary {
+ left: 0;
+}
+
+.book-summary {
+ position: absolute;
+ top: 0;
+ left: -300px;
+ bottom: 0;
+ z-index: 1;
+ overflow-y: auto;
+ width: 300px;
+ color: #364149;
+ background: #fafafa;
+ border-right: 1px solid rgba(0,0,0,.07);
+ -webkit-transition: left 250ms ease;
+ -moz-transition: left 250ms ease;
+ -o-transition: left 250ms ease;
+ transition: left 250ms ease;
+}
+
+.book-body {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ overflow-y: auto;
+ color: #333;
+ background: #fff;
+ -webkit-transition: left 250ms ease;
+ -moz-transition: left 250ms ease;
+ -o-transition: left 250ms ease;
+ transition: left 250ms ease;
+}
+
+.book-body .body-inner {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ overflow-y: auto;
+ padding-top: 10px;
+}
+
+.book-header {
+ overflow: visible;
+ height: 50px;
+ z-index: 2;
+ font-size: .85em;
+ color: #7e888b;
+ background: 0 0;
+}
+
+.book-header a.header-menu{
+ font-size: 18px;
+ color: #555555;
+ padding: 10px;
+ text-decoration: none;
+}
+
+.book-header a.header-menu:hover{
+ text-decoration: none;
+ color: #5cb85c;
+}
+
+.page-wrapper {
+ position: relative;
+ outline: 0;
+}
+
+.book .book-body .page-wrapper .page-inner {
+ position: relative;
+ left: 0px;
+ transition: 300ms ease left;
+}
+
+.page-inner {
+ position: relative;
+ max-width: 900px;
+ margin: 0 auto;
+ padding: 20px 15px 40px 15px;
+}
+
+@media (min-width: 600px){
+ .book.with-summary .book-body {
+ left: 300px;
+ }
+}
+
+@media (max-width: 600px){
+ .book-summary {
+ width: calc(100% - 60px);
+ bottom: 0;
+ left: -100%;
+ }
+ .book.with-summary .book-body {
+ -webkit-transform: translate(calc(100% - 60px),0);
+ -moz-transform: translate(calc(100% - 60px),0);
+ -ms-transform: translate(calc(100% - 60px),0);
+ -o-transform: translate(calc(100% - 60px),0);
+ transform: translate(calc(100% - 60px),0);
+ }
+}
+
+@media (max-width: 1240px){
+ .book-body {
+ -webkit-transition: -webkit-transform 250ms ease;
+ -moz-transition: -moz-transform 250ms ease;
+ -o-transition: -o-transform 250ms ease;
+ transition: transform 250ms ease;
+ padding-bottom: 20px;
+ }
+}
+
+@media (max-width: 1240px){
+ .book-body .body-inner {
+ position: static;
+ min-height: calc(100% - 50px);
+ }
+}
+
+.navbar{
+ background: #5cb85c;
+ color: #FFF;
+}
+
+.navbar a{
+ color: #FFF;
+}
+.navbar-brand{
+ font-weight: 600;
+}
+
+@media (min-width: 768px){
+ .navbar {
+ border-radius: 0;
+ }
+}
+
+.catalog .panel{
+ margin-bottom: 0;
+ border-radius: 0;
+ border: none;
+ box-shadow: none;
+ -webkit-box-shadow: none;
+}
+
+.catalog .catalog-title {
+ border-bottom: 1px solid #EAEAEA;
+ padding: 1rem 1.25rem;
+ background: rgba(0, 0, 0, .03);
+ cursor: pointer;
+ color: #333;
+ font-weight: 600;
+ font-size: 16px;
+}
+
+.catalog-item{
+ padding: 8px 15px;
+ margin-left: 15px;
+ color: #888;
+ border-bottom: solid #EEE 1px;
+ display: block;
+}
+
+.action-item h2 a{
+ color: #5cb85c;
+}
+
+a:hover{
+ color: #449d44;
+}
+
+.search-box{
+ position: relative;
+ margin: 10px;
+}
+
+.navbar{
+ margin-bottom: 0;
+}
+
+.main-content{
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ margin-top: 20px;
+}
+
+.text-bold{
+ font-weight: bold;
+}
+
+/**third part*/
+
+.algolia-autocomplete {
+ width: 100%;
+}
+.algolia-autocomplete .aa-input, .algolia-autocomplete .aa-hint {
+ width: 100%;
+}
+.algolia-autocomplete .aa-hint {
+ color: #888;
+}
+.algolia-autocomplete .aa-dropdown-menu {
+ width: 100%;
+ background-color: #fff;
+ border: 1px solid #EEE;
+ border-top: none;
+}
+.algolia-autocomplete .aa-dropdown-menu .aa-suggestion {
+ cursor: pointer;
+ padding: 5px 4px;
+}
+.algolia-autocomplete .aa-dropdown-menu .aa-suggestion.aa-cursor {
+ background-color: #449d44;
+ color: #FFF;
+}
+.algolia-autocomplete .aa-dropdown-menu .aa-suggestion em {
+ font-weight: bold;
+ font-style: normal;
+}
+
+
+/* Doxy pretty-printing styles. Used with prettify.js. */
+
+pre .str, code .str { color: #fec243; } /* string - eggyolk gold */
+pre .kwd, code .kwd { color: #8470FF; } /* keyword - light slate blue */
+pre .com, code .com { color: #32cd32; font-style: italic; } /* comment - green */
+pre .typ, code .typ { color: #6ecbcc; } /* type - turq green */
+pre .lit, code .lit { color: #d06; } /* literal - cherry red */
+pre .pun, code .pun { color: #8B8970; } /* punctuation - lemon chiffon4 */
+pre .pln, code .pln { color: #f0f0f0; } /* plaintext - white */
+pre .tag, code .tag { color: #9c9cff; } /* html/xml tag (bluey) */
+pre .htm, code .htm { color: #dda0dd; } /* html tag light purply*/
+pre .xsl, code .xsl { color: #d0a0d0; } /* xslt tag light purply*/
+pre .atn, code .atn { color: #46eeee; font-weight: normal;} /* html/xml attribute name - lt turquoise */
+pre .atv, code .atv { color: #EEB4B4; } /* html/xml attribute value - rosy brown2 */
+pre .dec, code .dec { color: #3387CC; } /* decimal - blue */
+
+a {
+ text-decoration: none;
+}
+
+pre.prettyprint, code.prettyprint {
+ font-family:'Droid Sans Mono','CPMono_v07 Bold','Droid Sans';
+ font-weight: bold;
+ font-size: 11pt;
+ background-color: #0f0f0f;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ -o-border-radius: 8px;
+ -ms-border-radius: 8px;
+ -khtml-border-radius: 8px;
+ border-radius: 8px;
+} /* background is black (well, just a tad less dark ) */
+
+pre.prettyprint {
+ padding: 1em;
+ white-space: pre-wrap;
+}
+
+pre.prettyprint a, code.prettyprint a {
+ text-decoration:none;
+}
+/* Specify class=linenums on a pre to get line numbering; line numbers themselves are the same color as punctuation */
+ol.linenums { margin-top: 0; margin-bottom: 0; color: #8B8970; } /* IE indents via margin-left */
+li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
+/* Alternate shading for lines */
+li.L1,li.L3,li.L5,li.L7,li.L9 { }
+
+/* print is mostly unchanged from default at present */
+@media print {
+ pre.prettyprint, code.prettyprint { background-color: #fff; }
+ pre .str, code .str { color: #088; }
+ pre .kwd, code .kwd { color: #006; font-weight: bold; }
+ pre .com, code .com { color: #oc3; font-style: italic; }
+ pre .typ, code .typ { color: #404; font-weight: bold; }
+ pre .lit, code .lit { color: #044; }
+ pre .pun, code .pun { color: #440; }
+ pre .pln, code .pln { color: #000; }
+ pre .tag, code .tag { color: #b66ff7; font-weight: bold; }
+ pre .htm, code .htm { color: #606; font-weight: bold; }
+ pre .xsl, code .xsl { color: #606; font-weight: bold; }
+ pre .atn, code .atn { color: #c71585; font-weight: normal; }
+ pre .atv, code .atv { color: #088; font-weight: normal; }
+}
diff --git a/src/main/java/com/dsideal/base/DataEase/Controller/DataEaseController.java b/src/main/java/com/dsideal/base/DataEase/Controller/DataEaseController.java
index 31715d49..f63d3f0f 100644
--- a/src/main/java/com/dsideal/base/DataEase/Controller/DataEaseController.java
+++ b/src/main/java/com/dsideal/base/DataEase/Controller/DataEaseController.java
@@ -20,7 +20,6 @@ import net.sf.json.JSONObject;
import java.util.List;
-@ApiDoc
public class DataEaseController extends Controller {
DataEaseModel dm = new DataEaseModel();
BaseModel bm = new BaseModel();
diff --git a/src/main/java/com/dsideal/base/Res/Controller/ResourceController.java b/src/main/java/com/dsideal/base/Res/Controller/ResourceController.java
index c221a0d3..98fa23d7 100644
--- a/src/main/java/com/dsideal/base/Res/Controller/ResourceController.java
+++ b/src/main/java/com/dsideal/base/Res/Controller/ResourceController.java
@@ -59,7 +59,6 @@ public class ResourceController extends Controller {
UploadFile uploadFile = getFile();
String fileName = uploadFile.getFileName();
String fileExtension = fileName.substring(fileName.lastIndexOf("."));
- String name = getPara("name");//中文名称
int type_id = getParaToInt("type_id");//1:文档,2:数据库
String file_id = UUID.randomUUID().toString();
String key = file_id + fileExtension;
@@ -75,7 +74,7 @@ public class ResourceController extends Controller {
uploadFile.getFile().renameTo(targetFile);
//保存到数据库记录
- rm.uploadZskDocument(name, key, type_id, identity_id, area_code);
+ rm.uploadZskDocument(fileName, key, type_id, identity_id, area_code);
//返回
Kv kv = Kv.create();