更新猪群对应猪栏接口变更

This commit is contained in:
2025-10-06 23:10:58 +08:00
parent aac0324616
commit 632bd20e7d
8 changed files with 680 additions and 60 deletions

View File

@@ -234,7 +234,10 @@ func (a *API) setupRoutes() {
pigBatchGroup.GET("/:id", a.pigBatchController.GetPigBatch)
pigBatchGroup.PUT("/:id", a.pigBatchController.UpdatePigBatch)
pigBatchGroup.DELETE("/:id", a.pigBatchController.DeletePigBatch)
pigBatchGroup.PUT("/:id/pens", a.pigBatchController.UpdatePigBatchPens)
pigBatchGroup.POST("/:id/assign-pens", a.pigBatchController.AssignEmptyPensToBatch)
pigBatchGroup.POST("/:fromBatchID/reclassify-pen", a.pigBatchController.ReclassifyPenToNewBatch)
pigBatchGroup.DELETE("/:batchID/remove-pen/:penID", a.pigBatchController.RemoveEmptyPenFromBatch)
pigBatchGroup.POST("/:id/move-pigs-into-pen", a.pigBatchController.MovePigsIntoPen)
}
a.logger.Info("猪批次相关接口注册成功 (需要认证和审计)")