Commit 777b0fd8 authored by 赵啸非's avatar 赵啸非

修改文档与添加登录返回token和过期时间

parent aca13562
...@@ -52,7 +52,7 @@ public class UploadController extends BaseController { ...@@ -52,7 +52,7 @@ public class UploadController extends BaseController {
@RequestMapping(value = "commonupload") @RequestMapping(value = "commonupload")
public String doFileUpload(MultipartFile file, @RequestParam(value = "prePath") String prePath) { public String doFileUpload(MultipartFile file, @RequestParam(value = "prePath",defaultValue = "/file/fileupload") String prePath) {
Map<String, Object> model = new HashMap<>(); Map<String, Object> model = new HashMap<>();
String jsonStr = ""; String jsonStr = "";
try { try {
......
...@@ -163,9 +163,8 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE ...@@ -163,9 +163,8 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE
AreaEntity areaEntity = this.selectOne(new AreaQuery().iid(parentId)); AreaEntity areaEntity = this.selectOne(new AreaQuery().iid(parentId));
if (!ObjectUtils.isEmpty(areaEntity)) { if (!ObjectUtils.isEmpty(areaEntity)) {
//查询当前区域是否有站点。 //查询当前区域是否有站点。
List<AreaTreeSelect> collect1 = siteService.find(new SiteQuery().areaCode(areaEntity.getAreaCode())).stream().map(site -> List<AreaTreeSelect> collect1 = siteService.find(new SiteQuery().areaCode(areaEntity.getAreaCode()))
new AreaTreeSelect(site) .stream().map(site ->new AreaTreeSelect(site)).collect(Collectors.toList());
).collect(Collectors.toList());
collect.addAll(collect1); collect.addAll(collect1);
} }
......
...@@ -136,6 +136,43 @@ msg|String|消息|- ...@@ -136,6 +136,43 @@ msg|String|消息|-
**响应消息样例:**
```
```
### 上传附件
**请求URL:** file/commonupload
**请求方式:** POST
**内容类型:** multipart/form-data
**简要描述:** 用户上传附件
**请求参数:**
参数名称|类型|备注|必填|其它
---|---|---|---|---
file|multipart|附件|是|-
prePath|String|附件存放相对路径|否|不填时候默认为/file/fileupload
**请求样例:**
```
http://127.0.0.1/file/commonupload?prePath=/file/fileupload
Content-Type: multipart/form-data; boundary=WebAppBoundary
--WebAppBoundary
Content-Disposition: form-data; name="file"; filename="1.excel"
Content-Type: multipart/form-data
```
**响应参数:**
**响应消息样例:** **响应消息样例:**
``` ```
...@@ -724,7 +761,7 @@ dict|object|字典对象|- ...@@ -724,7 +761,7 @@ dict|object|字典对象|-
参数名称|类型|备注|必填|其它 参数名称|类型|备注|必填|其它
---|---|---|---|--- ---|---|---|---|---
parentId|String|区域树父id|是|- parentId|String|区域树父id|是|0为树的顶层节点
**请求样例:** **请求样例:**
``` ```
...@@ -744,7 +781,7 @@ data|object|数据对象|- ...@@ -744,7 +781,7 @@ data|object|数据对象|-
&emsp;&emsp;label|String|节点名称|- &emsp;&emsp;label|String|节点名称|-
&emsp;&emsp;areaCode|String|区域编码|- &emsp;&emsp;areaCode|String|区域编码|-
&emsp;&emsp;isLeaf|String|是否叶子节点|- &emsp;&emsp;isLeaf|String|是否叶子节点|-
&emsp;&emsp;type|String|节点类型|- &emsp;&emsp;type|String|节点类型|type='site'表示站点,type='area'表示区域
&emsp;&emsp;icon|String|图标|- &emsp;&emsp;icon|String|图标|-
&emsp;&emsp;children|Arrays|子节点|- &emsp;&emsp;children|Arrays|子节点|-
......
<html> <html>
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>i5ting_ztree_toc:</title> <title>i5ting_ztree_toc:api-two</title>
<link href="toc/style/github.css" media="all" rel="stylesheet" type="text/css"/> <link href="toc/style/GitHub.css" media="all" rel="stylesheet" type="text/css"/>
<link href="toc/style/github2.css" media="all" rel="stylesheet" type="text/css"/> <link href="toc/style/GitHub2.css" media="all" rel="stylesheet" type="text/css"/>
<link href="toc/css/zTreeStyle/zTreeStyle.css" media="all" rel="stylesheet" type="text/css"/> <link href="toc/css/zTreeStyle/zTreeStyle.css" media="all" rel="stylesheet" type="text/css"/>
<style> <style>
pre { pre {
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</ul> </ul>
</div> </div>
<div id='readme' style='width:70%;margin-left:20%;'> <div id='readme' style='width:90%;margin-left:20%;'>
<article class='markdown-body'> <article class='markdown-body'>
<h1 id="-">基础服务平台</h1> <h1 id="-">基础服务平台</h1>
<table> <table>
...@@ -304,6 +304,49 @@ ...@@ -304,6 +304,49 @@
{ {
} }
</code></pre><p><strong>响应参数:</strong></p>
<p><strong>响应消息样例:</strong></p>
<pre class="prettyprint linenums:0"><code>
</code></pre><h3 id="-">上传附件</h3>
<p><strong>请求URL:</strong> file/commonupload</p>
<p><strong>请求方式:</strong> POST</p>
<p><strong>内容类型:</strong> multipart/form-data</p>
<p><strong>简要描述:</strong> 用户上传附件</p>
<p><strong>请求参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>备注</th>
<th>必填</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>file</td>
<td>multipart</td>
<td>附件</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>prePath</td>
<td>String</td>
<td>附件存放相对路径</td>
<td></td>
<td>不填时候默认为/file/fileupload</td>
</tr>
</tbody>
</table>
<p><strong>请求样例:</strong></p>
<pre class="prettyprint linenums:0"><code>http://127.0.0.1/file/commonupload?prePath=/file/fileupload
Content-Type: multipart/form-data; boundary=WebAppBoundary
--WebAppBoundary
Content-Disposition: form-data; name=&quot;file&quot;; filename=&quot;1.excel&quot;
Content-Type: multipart/form-data
</code></pre><p><strong>响应参数:</strong></p> </code></pre><p><strong>响应参数:</strong></p>
<p><strong>响应消息样例:</strong></p> <p><strong>响应消息样例:</strong></p>
<pre class="prettyprint linenums:0"><code> <pre class="prettyprint linenums:0"><code>
...@@ -1799,7 +1842,7 @@ ...@@ -1799,7 +1842,7 @@
<td>String</td> <td>String</td>
<td>区域树父id</td> <td>区域树父id</td>
<td></td> <td></td>
<td>-</td> <td>0为树的顶层节点</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -1870,7 +1913,7 @@ ...@@ -1870,7 +1913,7 @@
<td>&emsp;&emsp;type</td> <td>&emsp;&emsp;type</td>
<td>String</td> <td>String</td>
<td>节点类型</td> <td>节点类型</td>
<td>-</td> <td>type=&#39;site&#39;表示站点,type=&#39;area&#39;表示区域</td>
</tr> </tr>
<tr> <tr>
<td>&emsp;&emsp;icon</td> <td>&emsp;&emsp;icon</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment