配餐软件
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.
 
 
 

4.3 KiB

单位部分

1. 检验账号重复性

GET /api/vender/check/account?account=xxx

输出:

{
  "body": false, // true未被占用,可用
  "code": 200,
  "desc": "成功",
  "success": true
}

2. 检查单位名称重复性

GET /api/vender/check/name?name=xxx

输出:

{
  "body": false, // true未被占用,可用
  "code": 200,
  "desc": "成功",
  "success": true
}

3. 查询单位配置

GET /api/vender/config

输出:

{
  "body": {
    "breakfast": 10.00,
    "dinner": 10.00,
    "lunch": 10.00
  },
  "code": 200,
  "desc": "成功",
  "success": true
}

4. 修改单位配置

POST /api/vender/config

输入:

Content-Type:application/x-www-form-urlencoded
vender=1    // 必填
breakfast=10.00 // 必填
dinner=10 // 必填
lunch=10 // 必填

输出:

{
  "code": 200,
  "desc": "成功",
  "success": true
}

5. 添加企业

PUT /api/vender

管理端接口

输入:

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": 200,
  "desc": "成功",
  "success": true
}

6. 删除企业

DELETE /api/vender

管理端接口

输入:

Content-Type:application/x-www-form-urlencoded
vender=1    // 必填

输出:

{
  "code": 200,
  "desc": "成功",
  "success": true
}

7. 修改企业

POST /api/vender

续费和开关仅管理端,其他管理端或者业务端主账号操作

输入:

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": 200,
  "desc": "成功",
  "success": true
}

8. 获取企业列表

GET /api/vender

管理端接口

输入:

keyword=1    // 根据单位名称模糊匹配
pageSize=20  // 默认20, 全部非必填
pageNo=0     // 默认0, 从0开始

输出:

{
  "body": {
    "content": [
        {
          "account": "xxx",
          "address": "百仁路",
          "area": "青羊区",
          "category": "小学",
          "city": "成都市",
          "contacts": "曹先生",
          "expire": 1695033585000,
          "icon": "1232334234.jpg",
          "id": 1,
          "name": "成都实验小学",
          "phone": "13919103408",
          "province": "四川省",
          "status": true
        }
    ],
    "number": 0,
    "size": 20,
    "totalElements": 1,
    "totalPages": 1
  },
  "code": 200,
  "desc": "成功",
  "success": true
}

9. 获取企业列表(管理端其他部分选择企业使用)

GET /api/vender/select

管理端接口

输入:

keyword=1    // 根据单位名称模糊匹配
vendors=1,2,3  // 根据ID批量获取单位信息

输出:

{
  "body": [
    {
      "account": "xxx",
      "category": "小学",
      "id": 1,
      "name": "成都实验小学"
    }
  ],
  "code": 200,
  "desc": "成功",
  "success": true
}

10. 获取当前企业信息

GET /api/vender/info

管理端接口

输入:

输出:

{
  "body": {
    "content": [
        {
          "account": "xxx",
          "address": "百仁路",
          "area": "青羊区",
          "category": "小学",
          "city": "成都市",
          "contacts": "曹先生",
          "expire": 1695033585000,
          "icon": "1232334234.jpg",
          "id": 1,
          "name": "成都实验小学",
          "phone": "13919103408",
          "province": "四川省",
          "status": true
        }
    ],
    "number": 0,
    "size": 20,
    "totalElements": 1,
    "totalPages": 1
  },
  "code": 200,
  "desc": "成功",
  "success": true
}