|
|
|
<h1>��Ʒ����</h1>
|
|
|
|
<h1>1. ��ѯ��Ʒ(��������ģ����ѯ)</h1>
|
|
|
|
<blockquote>
|
|
|
|
<p>GET /api/dish</p>
|
|
|
|
</blockquote>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<pre><code class="text">pageSize=20 // Ĭ��20, ȫ���DZ���
|
|
|
|
pageNo=0 // Ĭ��0, ��0��ʼ
|
|
|
|
keyword=���Ѽ����� // ��ѯ�ؼ���
|
|
|
|
mark=���� // ��ǩ ȡֵ����GET /api/basic/enum �ӿ��е� mark
|
|
|
|
poly=�� // �����ַ� ȡֵ����GET /api/basic/enum �ӿ��е� poly
|
|
|
|
</code></pre>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<pre><code class="json">{
|
|
|
|
"body": {
|
|
|
|
"content": [
|
|
|
|
{
|
|
|
|
"icon": "112342343.jpg",
|
|
|
|
"id": 2,
|
|
|
|
"ingredient": [
|
|
|
|
{
|
|
|
|
"isMain": true,
|
|
|
|
"key": "011101",
|
|
|
|
"value": 500
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"marks": "��ʳ",
|
|
|
|
"poly": "��",
|
|
|
|
"modify": 1695277128000,
|
|
|
|
"month": [
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3,
|
|
|
|
4,
|
|
|
|
5,
|
|
|
|
6,
|
|
|
|
7,
|
|
|
|
8,
|
|
|
|
9,
|
|
|
|
10,
|
|
|
|
1,
|
|
|
|
12
|
|
|
|
],
|
|
|
|
"name": "���ѳ�����",
|
|
|
|
"vender": 4
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"number": 0,
|
|
|
|
"size": 20,
|
|
|
|
"totalElements": 2,
|
|
|
|
"totalPages": 1
|
|
|
|
},
|
|
|
|
"code": 200,
|
|
|
|
"desc": "�ɹ�",
|
|
|
|
"success": true
|
|
|
|
}
|
|
|
|
</code></pre>
|
|
|
|
<h1>2. ��ѯ��Ʒ(����ID��ȷ��ѯ)</h1>
|
|
|
|
<blockquote>
|
|
|
|
<p>GET /api/dish</p>
|
|
|
|
</blockquote>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<pre><code class="text">id=1
|
|
|
|
</code></pre>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<pre><code class="json">{
|
|
|
|
"icon": "data:image/png;base64,iVBORkJggg==",
|
|
|
|
"id": 1,
|
|
|
|
"ingredient": [
|
|
|
|
{
|
|
|
|
"isMain": true,
|
|
|
|
"key": "011101",
|
|
|
|
"value": 500
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"marks": "����",
|
|
|
|
"poly": "��",
|
|
|
|
"month": [
|
|
|
|
1,
|
|
|
|
3,
|
|
|
|
5,
|
|
|
|
7,
|
|
|
|
9,
|
|
|
|
12
|
|
|
|
],
|
|
|
|
"name": "���Ѽ�����",
|
|
|
|
"vender": 1
|
|
|
|
}
|
|
|
|
</code></pre>
|
|
|
|
<h1>3. ��������ģ����ѯ(����ʳ�ײ���ѡ����Ʒ)</h1>
|
|
|
|
<blockquote>
|
|
|
|
<p>GET /api/dish/select</p>
|
|
|
|
</blockquote>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<pre><code class="text">keyword=��
|
|
|
|
</code></pre>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<pre><code class="json">{
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"id": 25,
|
|
|
|
"ingredient": [
|
|
|
|
{
|
|
|
|
"key": "3355",
|
|
|
|
"value": 22
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"key": "3378",
|
|
|
|
"value": 111
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"marks": "��ʳ",
|
|
|
|
"poly": "��",
|
|
|
|
"name": "���Ŷ���"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 24,
|
|
|
|
"ingredient": [
|
|
|
|
{
|
|
|
|
"isMain": false,
|
|
|
|
"key": "3355",
|
|
|
|
"value": 22
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"isMain": true,
|
|
|
|
"key": "3378",
|
|
|
|
"value": 111
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"marks": "��ʳ",
|
|
|
|
"poly": "��",
|
|
|
|
"name": "���Ŷ���"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"code": 200,
|
|
|
|
"desc": "�ɹ�",
|
|
|
|
"success": true
|
|
|
|
}
|
|
|
|
</code></pre>
|
|
|
|
<h1>4. Ӫ����ǩ</h1>
|
|
|
|
<blockquote>
|
|
|
|
<p>GET /api/dish/label</p>
|
|
|
|
</blockquote>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<pre><code class="text">ids=1,2,3 // ����ID����ָ����ǩ�������������в�Ʒ�ı�ǩ�б�
|
|
|
|
</code></pre>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<pre><code class="json">{
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"component": [
|
|
|
|
{
|
|
|
|
"name": "��",
|
|
|
|
"nutrition": "60.00(mg)",
|
|
|
|
"nvr": "0.00%"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "vitamin-a",
|
|
|
|
"nutrition": "115.00(-)",
|
|
|
|
"nvr": "-"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "������",
|
|
|
|
"nutrition": "75.00(g)",
|
|
|
|
"nvr": "1.00%"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "֬��",
|
|
|
|
"nutrition": "50.00(g)",
|
|
|
|
"nvr": "1.00%"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "����kcal",
|
|
|
|
"nutrition": "50.00(kcal)",
|
|
|
|
"nvr": "0.00%"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"ingredients": [
|
|
|
|
"��"
|
|
|
|
],
|
|
|
|
"name": "���ѳ�����"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"code": 200,
|
|
|
|
"desc": "�ɹ�",
|
|
|
|
"success": true
|
|
|
|
}
|
|
|
|
</code></pre>
|
|
|
|
<h1>5. ���Ӳ�Ʒ</h1>
|
|
|
|
<blockquote>
|
|
|
|
<p>PUT /api/dish</p>
|
|
|
|
</blockquote>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<pre><code class="text">Content-Type:application/x-www-form-urlencoded
|
|
|
|
name=���ѳ����� // ���� ����
|
|
|
|
vendors=1,2,3 // ��λ�б�, �����˱��ҵ����û��
|
|
|
|
icon= // ͼƬ
|
|
|
|
month=1,2,3 //�·�
|
|
|
|
mark=���� // ���� ��ǩ ȡֵ����GET /api/basic/enum �ӿ��е� mark
|
|
|
|
poly=�� // ���� �����ַ� ȡֵ����GET /api/basic/enum �ӿ��е� poly
|
|
|
|
ingredient=[{"key": "011101", "value": 500, "isMain": true}] // ʳ���б�
|
|
|
|
</code></pre>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<pre><code class="json">{
|
|
|
|
"code": 200,
|
|
|
|
"desc": "�ɹ�",
|
|
|
|
"success": true
|
|
|
|
}
|
|
|
|
</code></pre>
|
|
|
|
<h1>6. ��</h1>
|
|
|
|
<blockquote>
|
|
|
|
<p>POST /api/dish</p>
|
|
|
|
</blockquote>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<pre><code class="text">Content-Type:application/x-www-form-urlencoded
|
|
|
|
id=1 // ����
|
|
|
|
name=���ѳ����� // ���� ����
|
|
|
|
vendors=1,2,3 // ��λ�б�
|
|
|
|
icon= // ͼƬ
|
|
|
|
month=1,2,3 // �·�
|
|
|
|
mark=���� // ��ǩ ȡֵ����GET /api/basic/enum �ӿ��е� mark
|
|
|
|
poly=�� // ���� �����ַ� ȡֵ����GET /api/basic/enum �ӿ��е� poly
|
|
|
|
ingredient=[{"key": "011101", "value": 500, "isMain": true}] // ʳ���б�
|
|
|
|
</code></pre>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<pre><code class="json">{
|
|
|
|
"code": 200,
|
|
|
|
"desc": "�ɹ�",
|
|
|
|
"success": true
|
|
|
|
}
|
|
|
|
</code></pre>
|
|
|
|
<h1>7. ɾ��</h1>
|
|
|
|
<blockquote>
|
|
|
|
<p>DELETE /api/dish</p>
|
|
|
|
</blockquote>
|
|
|
|
<h3>����:</h3>
|
|
|
|
<p>Content-Type:application/x-www-form-urlencoded
|
|
|
|
ids=9,10 // ����</p>
|
|
|
|
<p>����:</p>
|
|
|
|
<pre><code class="text">{
|
|
|
|
"code": 200,
|
|
|
|
"desc": "�ɹ�",
|
|
|
|
"success": true
|
|
|
|
}
|
|
|
|
</code></pre>
|
|
|
|
|