配餐软件
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

191 lines
4.6 KiB

<h1>单位部分</h1>
<h1>1. 检验账号重复性</h1>
<blockquote>
<p>GET /api/vender/check/account?account=xxx</p>
</blockquote>
<h3>输出:</h3>
<pre><code>{
&quot;body&quot;: false, // true未被占用,可用
&quot;code&quot;: 200,
&quot;desc&quot;: &quot;成功&quot;,
&quot;success&quot;: true
}
</code></pre>
<h1>2. 检查单位名称重复性</h1>
<blockquote>
<p>GET /api/vender/check/name?name=xxx</p>
</blockquote>
<h3>输出:</h3>
<pre><code>{
&quot;body&quot;: false, // true未被占用,可用
&quot;code&quot;: 200,
&quot;desc&quot;: &quot;成功&quot;,
&quot;success&quot;: true
}
</code></pre>
<h1>3. 查询单位配置</h1>
<blockquote>
<p>GET /api/vender/config</p>
</blockquote>
<h3>输出:</h3>
<pre><code>{
&quot;body&quot;: {
&quot;breakfast&quot;: 10.00,
&quot;dinner&quot;: 10.00,
&quot;lunch&quot;: 10.00
},
&quot;code&quot;: 200,
&quot;desc&quot;: &quot;成功&quot;,
&quot;success&quot;: true
}
</code></pre>
<h1>4. 修改单位配置</h1>
<blockquote>
<p>POST /api/vender/config</p>
</blockquote>
<h3>输入:</h3>
<pre><code>Content-Type:application/x-www-form-urlencoded
vender=1 // 必填
breakfast=10.00 // 必填
dinner=10 // 必填
lunch=10 // 必填
</code></pre>
<h3>输出:</h3>
<pre><code>{
&quot;code&quot;: 200,
&quot;desc&quot;: &quot;成功&quot;,
&quot;success&quot;: true
}
</code></pre>
<h1>5. 添加企业</h1>
<blockquote>
<p>PUT /api/vender</p>
<p>管理端接口</p>
</blockquote>
<h3>输入:</h3>
<pre><code>Content-Type:application/x-www-form-urlencoded
account=ccc // 必填, 初始管理员账号, 不能重复
password=BE56E057F20F883E // 必填, MD5加密后大写取后16位,示例原密码为123456
name=曹 // 必填, 单位名称
category=学校 // 必填, 单位类型
expire=2019-10-10 // 必填, 过期时间
icon=23423 //单位logo, 前端可用的base64字符串
address=
contacts=
phone=
email=
</code></pre>
<h3>输出:</h3>
<pre><code>{
&quot;code&quot;: 200,
&quot;desc&quot;: &quot;成功&quot;,
&quot;success&quot;: true
}
</code></pre>
<h1>6. 删除企业</h1>
<blockquote>
<p>DELETE /api/vender</p>
<p>管理端接口</p>
</blockquote>
<h3>输入:</h3>
<pre><code>Content-Type:application/x-www-form-urlencoded
vender=1 // 必填
</code></pre>
<h3>输出:</h3>
<pre><code>{
&quot;code&quot;: 200,
&quot;desc&quot;: &quot;成功&quot;,
&quot;success&quot;: true
}
</code></pre>
<h1>7. 修改企业</h1>
<blockquote>
<p>POST /api/vender</p>
<p>续费和开关仅管理端,其他管理端或者业务端主账号操作</p>
</blockquote>
<h3>输入:</h3>
<pre><code>Content-Type:application/x-www-form-urlencoded
venderId=1 // 必填
expire=2019-10-10 // 仅管理端可以改过期时间
status=false // 仅管理端可以改状态, false-关闭,true-打开
category=学校 // 单位类型
account=ccc // 改绑定的主账户, 将自动为改账户赋管理员权限, 不能重复
name=曹 // 改单位名称
icon=23423 //单位logo, 先调用上传接口上传后得到文件名
address=
contacts=
phone=
email=
</code></pre>
<h3>输出:</h3>
<pre><code>{
&quot;code&quot;: 200,
&quot;desc&quot;: &quot;成功&quot;,
&quot;success&quot;: true
}
</code></pre>
<h1>8. 获取企业列表</h1>
<blockquote>
<p>GET /api/vender</p>
<p>管理端接口</p>
</blockquote>
<h3>输入:</h3>
<pre><code>keyword=1 // 根据单位名称模糊匹配
pageSize=20 // 默认20, 全部非必填
pageNo=0 // 默认0, 从0开始
</code></pre>
<h3>输出:</h3>
<pre><code>{
&quot;body&quot;: {
&quot;content&quot;: [
{
&quot;account&quot;: &quot;xxx&quot;,
&quot;address&quot;: &quot;百仁路&quot;,
&quot;area&quot;: &quot;青羊区&quot;,
&quot;category&quot;: &quot;小学&quot;,
&quot;city&quot;: &quot;成都市&quot;,
&quot;contacts&quot;: &quot;曹先生&quot;,
&quot;expire&quot;: 1695033585000,
&quot;icon&quot;: &quot;1232334234.jpg&quot;,
&quot;id&quot;: 1,
&quot;name&quot;: &quot;成都实验小学&quot;,
&quot;phone&quot;: &quot;13919103408&quot;,
&quot;province&quot;: &quot;四川省&quot;,
&quot;status&quot;: true
}
],
&quot;number&quot;: 0,
&quot;size&quot;: 20,
&quot;totalElements&quot;: 1,
&quot;totalPages&quot;: 1
},
&quot;code&quot;: 200,
&quot;desc&quot;: &quot;成功&quot;,
&quot;success&quot;: true
}
</code></pre>
<h1>9. 获取企业列表(管理端其他部分选择企业使用)</h1>
<blockquote>
<p>GET /api/vender/select</p>
<p>管理端接口</p>
</blockquote>
<h3>输入:</h3>
<pre><code>keyword=1 // 根据单位名称模糊匹配
vendors=1,2,3 // 根据ID批量获取单位信息
</code></pre>
<h3>输出:</h3>
<pre><code>{
&quot;body&quot;: [
{
&quot;account&quot;: &quot;xxx&quot;,
&quot;category&quot;: &quot;小学&quot;,
&quot;id&quot;: 1,
&quot;name&quot;: &quot;成都实验小学&quot;
}
],
&quot;code&quot;: 200,
&quot;desc&quot;: &quot;成功&quot;,
&quot;success&quot;: true
}
</code></pre>