实现修改批次绑定的猪栏

This commit is contained in:
2025-10-04 00:47:27 +08:00
parent d03163a189
commit 8bb0a54f18
13 changed files with 498 additions and 27 deletions

View File

@@ -229,7 +229,7 @@ func (c *PigFarmController) CreatePen(ctx *gin.Context) {
HouseID: pen.HouseID,
Capacity: pen.Capacity,
Status: pen.Status,
PigBatchID: pen.PigBatchID,
PigBatchID: *pen.PigBatchID,
}
controller.SendSuccessWithAudit(ctx, controller.CodeCreated, "创建成功", resp, action, "创建成功", resp)
}
@@ -267,7 +267,7 @@ func (c *PigFarmController) GetPen(ctx *gin.Context) {
HouseID: pen.HouseID,
Capacity: pen.Capacity,
Status: pen.Status,
PigBatchID: pen.PigBatchID,
PigBatchID: *pen.PigBatchID,
}
controller.SendSuccessWithAudit(ctx, controller.CodeSuccess, "获取成功", resp, action, "获取成功", resp)
}
@@ -296,7 +296,7 @@ func (c *PigFarmController) ListPens(ctx *gin.Context) {
HouseID: pen.HouseID,
Capacity: pen.Capacity,
Status: pen.Status,
PigBatchID: pen.PigBatchID,
PigBatchID: *pen.PigBatchID,
})
}
@@ -344,7 +344,7 @@ func (c *PigFarmController) UpdatePen(ctx *gin.Context) {
HouseID: pen.HouseID,
Capacity: pen.Capacity,
Status: pen.Status,
PigBatchID: pen.PigBatchID,
PigBatchID: *pen.PigBatchID,
}
controller.SendSuccessWithAudit(ctx, controller.CodeSuccess, "更新成功", resp, action, "更新成功", resp)
}