猪群领域其他方法映射到api
This commit is contained in:
		| @@ -226,7 +226,7 @@ func (a *API) setupRoutes() { | ||||
| 		} | ||||
| 		a.logger.Info("猪圈相关接口注册成功 (需要认证和审计)") | ||||
|  | ||||
| 		// 猪批次相关路由组 | ||||
| 		// 猪群相关路由组 | ||||
| 		pigBatchGroup := authGroup.Group("/pig-batches") | ||||
| 		{ | ||||
| 			pigBatchGroup.POST("", a.pigBatchController.CreatePigBatch) | ||||
| @@ -238,6 +238,16 @@ func (a *API) setupRoutes() { | ||||
| 			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) | ||||
| 			pigBatchGroup.POST("/:id/sell-pigs", a.pigBatchController.SellPigs) | ||||
| 			pigBatchGroup.POST("/:id/buy-pigs", a.pigBatchController.BuyPigs) | ||||
| 			pigBatchGroup.POST("/:sourceBatchID/transfer-across-batches", a.pigBatchController.TransferPigsAcrossBatches) | ||||
| 			pigBatchGroup.POST("/:id/transfer-within-batch", a.pigBatchController.TransferPigsWithinBatch) | ||||
| 			pigBatchGroup.POST("/:id/record-sick-pigs", a.pigBatchController.RecordSickPigs) | ||||
| 			pigBatchGroup.POST("/:id/record-sick-pig-recovery", a.pigBatchController.RecordSickPigRecovery) | ||||
| 			pigBatchGroup.POST("/:id/record-sick-pig-death", a.pigBatchController.RecordSickPigDeath) | ||||
| 			pigBatchGroup.POST("/:id/record-sick-pig-cull", a.pigBatchController.RecordSickPigCull) | ||||
| 			pigBatchGroup.POST("/:id/record-death", a.pigBatchController.RecordDeath) | ||||
| 			pigBatchGroup.POST("/:id/record-cull", a.pigBatchController.RecordCull) | ||||
| 		} | ||||
| 		a.logger.Info("猪批次相关接口注册成功 (需要认证和审计)") | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user