实现修改批次绑定的猪栏
This commit is contained in:
@@ -401,6 +401,8 @@ definitions:
|
||||
- $ref: '#/definitions/models.PigBatchStatus'
|
||||
description: 批次状态,可选
|
||||
type: object
|
||||
dto.PigBatchUpdatePensRequest:
|
||||
type: object
|
||||
dto.PigHouseResponse:
|
||||
properties:
|
||||
description:
|
||||
@@ -1438,6 +1440,49 @@ paths:
|
||||
summary: 更新猪批次
|
||||
tags:
|
||||
- 猪批次管理
|
||||
/api/v1/pig-batches/{id}/pens:
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 更新指定猪批次当前关联的猪栏列表
|
||||
parameters:
|
||||
- description: 猪批次ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 猪批次关联的猪栏ID列表
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.PigBatchUpdatePensRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 更新成功
|
||||
schema:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
"400":
|
||||
description: 请求参数错误或无效的ID格式
|
||||
schema:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
"404":
|
||||
description: 猪批次或猪栏不存在
|
||||
schema:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
"409":
|
||||
description: 业务逻辑冲突 (如猪栏已被占用)
|
||||
schema:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
"500":
|
||||
description: 内部服务器错误
|
||||
schema:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 更新猪批次关联的猪栏
|
||||
tags:
|
||||
- 猪批次管理
|
||||
/api/v1/pig-houses:
|
||||
get:
|
||||
description: 获取所有猪舍的列表
|
||||
|
||||
Reference in New Issue
Block a user