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

2.0 KiB

油盐糖部分

1. 查询

GET /api/sugar

输入:

Content-Type:application/x-www-form-urlencoded
startTime=2023-12-07 // 查询时间段
endTime=2023-12-20   // 查询时间段
pageSize=20  // 默认20
pageNo=0     // 默认0, 从0开始

输出:

{
  "body": {
    "content": [
      {
        "id": 1,
        "day": 5,
        "endTime": 1702742400000,
        "name": "2023-50周",
        "oilDay": 100.00,
        "oilWeek": 100.00,
        "saltDay": 100.00,
        "saltWeek": 100.00,
        "startTime": 1702224000000,
        "sugarDay": 100.00,
        "sugarWeek": 100.00,
        "vender": 1
      }
    ],
    "number": 0,
    "size": 20,
    "totalElements": 1,
    "totalPages": 1
  },
  "code": 200,
  "desc": "成功",
  "success": true
}

2. 添加

PUT /api/sugar

输入:

Content-Type:application/x-www-form-urlencoded
day=5                // 天数, 必填
startTime=2023-12-07 // 查询时间段, 必填
endTime=2023-12-20   // 查询时间段, 必填
sugarWeek=50         // 周总量(糖), 非必填
oilWeek=100          // 周总量(油), 非必填
saltWeek=100         // 周总量(盐), 非必填

输出:

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

3. 修改

POST /api/sugar

输入:

Content-Type:application/x-www-form-urlencoded
id=1                 // 编号,       必填
day=5                // 天数,      非必填
startTime=2023-12-07 // 查询时间段, 非必填
endTime=2023-12-20   // 查询时间段, 非必填
sugarWeek=50         // 周总量(糖), 非必填
oilWeek=100          // 周总量(油), 非必填
saltWeek=100         // 周总量(盐), 非必填

输出:

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

4. 删除

DELETE /api/sugar

输入:

Content-Type:application/x-www-form-urlencoded
id=1                 // 编号,       必填

输出:

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