获取部门树列表
<p>[TOC]</p>
<h5>简要描述</h5>
<ul>
<li>获取部门树列表</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>/sys/dept/tree</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>GET </li>
</ul>
<h5>参数</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">tenantId</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">integer</td>
<td>合作商ID</td>
</tr>
</tbody>
</table>
<h5>请求示例</h5>
<ul>
<li><code>http://localhost:7777/sys/dept/tree?tenantId=1</code></li>
</ul>
<h5>返回示例</h5>
<pre><code>{
&quot;code&quot;: 0,
&quot;msg&quot;: &quot;操作成功&quot;,
&quot;rqtid&quot;: &quot;310018task-1&quot;,
&quot;versionCode&quot;: &quot;2.0&quot;,
&quot;data&quot;: [
{
&quot;id&quot;: 11,
&quot;name&quot;: &quot;研发管理中心&quot;,
&quot;parentId&quot;: 0,
&quot;parentName&quot;: &quot;&quot;,
&quot;orderNum&quot;: 1,
&quot;leader&quot;: &quot;李总&quot;,
&quot;phone&quot;: &quot;18800000000&quot;,
&quot;status&quot;: 0,
&quot;orgCategory&quot;: 0,
&quot;tenantId&quot;: 1,
&quot;createTime&quot;: &quot;2024-11-16 15:01:08&quot;,
&quot;createUser&quot;: 1,
&quot;updateTime&quot;: &quot;2024-11-17 14:17:48&quot;,
&quot;updateUser&quot;: 1,
&quot;deleteFlag&quot;: 0,
&quot;label&quot;: &quot;研发管理中心&quot;,
&quot;children&quot;: [
{
&quot;id&quot;: 14,
&quot;name&quot;: &quot;前端组&quot;,
&quot;parentId&quot;: 11,
&quot;parentName&quot;: &quot;&quot;,
&quot;orderNum&quot;: 19,
&quot;leader&quot;: &quot;前端负责人&quot;,
&quot;status&quot;: 0,
&quot;orgCategory&quot;: 0,
&quot;tenantId&quot;: 1,
&quot;createTime&quot;: &quot;2024-11-16 15:03:14&quot;,
&quot;createUser&quot;: 1,
&quot;updateTime&quot;: &quot;2024-11-16 18:10:35&quot;,
&quot;updateUser&quot;: 1,
&quot;deleteFlag&quot;: 0,
&quot;label&quot;: &quot;前端组&quot;,
&quot;children&quot;: [],
},
{
&quot;id&quot;: 15,
&quot;name&quot;: &quot;后端组&quot;,
&quot;parentId&quot;: 11,
&quot;parentName&quot;: &quot;&quot;,
&quot;orderNum&quot;: 6,
&quot;leader&quot;: &quot;后端负责人&quot;,
&quot;status&quot;: 0,
&quot;orgCategory&quot;: 0,
&quot;tenantId&quot;: 1,
&quot;createTime&quot;: &quot;2024-11-16 15:03:39&quot;,
&quot;createUser&quot;: 1,
&quot;updateTime&quot;: &quot;2024-11-17 13:04:16&quot;,
&quot;updateUser&quot;: 1,
&quot;deleteFlag&quot;: 0,
&quot;label&quot;: &quot;后端组&quot;,
&quot;children&quot;: [
{
&quot;id&quot;: 21,
&quot;name&quot;: &quot;java&quot;,
&quot;parentId&quot;: 15,
&quot;parentName&quot;: &quot;&quot;,
&quot;orderNum&quot;: 0,
&quot;status&quot;: 0,
&quot;orgCategory&quot;: 0,
&quot;tenantId&quot;: 1,
&quot;createTime&quot;: &quot;2024-11-17 16:29:20&quot;,
&quot;createUser&quot;: 1,
&quot;updateTime&quot;: &quot;2024-11-17 16:29:20&quot;,
&quot;updateUser&quot;: 1,
&quot;deleteFlag&quot;: 0,
&quot;label&quot;: &quot;java&quot;,
&quot;children&quot;: []
}
]
},
{
&quot;id&quot;: 13,
&quot;name&quot;: &quot;产品组&quot;,
&quot;parentId&quot;: 11,
&quot;parentName&quot;: &quot;&quot;,
&quot;orderNum&quot;: 3,
&quot;leader&quot;: &quot;产品负责人&quot;,
&quot;status&quot;: 0,
&quot;orgCategory&quot;: 0,
&quot;tenantId&quot;: 1,
&quot;createTime&quot;: &quot;2024-11-16 15:02:54&quot;,
&quot;createUser&quot;: 1,
&quot;updateTime&quot;: &quot;2024-11-17 20:30:35&quot;,
&quot;updateUser&quot;: 1,
&quot;deleteFlag&quot;: 0,
&quot;label&quot;: &quot;产品组&quot;,
&quot;children&quot;: []
}
],
},
... ...
],
&quot;model&quot;: {
&quot;dict&quot;: {
&quot;tenantId&quot;: {
&quot;1&quot;: &quot;中国广电&quot;,
&quot;38&quot;: &quot;ppz&quot;,
&quot;41&quot;: &quot;合作方1&quot;,
&quot;42&quot;: &quot;四川格物智享科技有限公司&quot;
}
}
}
}</code></pre>
<h5>返回参数说明</h5>
<ul>
<li>result说明</li>
</ul>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">int</td>
<td>响应编码:0 成功,其他 失败</td>
</tr>
<tr>
<td style="text-align: left;">msg</td>
<td style="text-align: left;">string</td>
<td>响应消息</td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">object</td>
<td>响应数据</td>
</tr>
<tr>
<td style="text-align: left;">rqtid</td>
<td style="text-align: left;">string</td>
<td>请求流水号</td>
</tr>
</tbody>
</table>
<ul>
<li>Data 说明</li>
</ul>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">integer</td>
<td>序号,主键,自增长</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>部门名称</td>
</tr>
<tr>
<td style="text-align: left;">parentId</td>
<td style="text-align: left;">integer</td>
<td>父id</td>
</tr>
<tr>
<td style="text-align: left;">parentName</td>
<td style="text-align: left;">string</td>
<td>父级部门名称</td>
</tr>
<tr>
<td style="text-align: left;">orderNum</td>
<td style="text-align: left;">integer</td>
<td>显示顺序</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>