简化控制器层重复代码

This commit is contained in:
2025-10-07 00:18:17 +08:00
parent 21661eb748
commit 77ab434d17
4 changed files with 74 additions and 130 deletions

View File

@@ -8,7 +8,7 @@ import (
// SellPigs godoc
// @Summary 处理卖猪的业务逻辑
// @Description 记录猪批次中的猪只出售事件
// @Tags 猪批次管理
// @Tags 猪管理
// @Accept json
// @Produce json
// @Param id path int true "猪批次ID"
@@ -32,7 +32,7 @@ func (c *PigBatchController) SellPigs(ctx *gin.Context) {
// BuyPigs godoc
// @Summary 处理买猪的业务逻辑
// @Description 记录猪批次中的猪只购买事件
// @Tags 猪批次管理
// @Tags 猪管理
// @Accept json
// @Produce json
// @Param id path int true "猪批次ID"