处理路由冲突
This commit is contained in:
@@ -55,7 +55,7 @@ func (c *PigBatchController) CreatePigBatch(ctx *gin.Context) {
|
||||
// @Produce json
|
||||
// @Param id path int true "猪批次ID"
|
||||
// @Success 200 {object} controller.Response{data=dto.PigBatchResponseDTO} "获取成功"
|
||||
// @Router /api/v1/pig-batches/{id} [get]\
|
||||
// @Router /api/v1/pig-batches/{id} [get]
|
||||
func (c *PigBatchController) GetPigBatch(ctx *gin.Context) {
|
||||
const action = "获取猪批次"
|
||||
|
||||
@@ -144,7 +144,7 @@ func (c *PigBatchController) ListPigBatches(ctx *gin.Context) {
|
||||
// @Param id path int true "猪批次ID"
|
||||
// @Param body body dto.AssignEmptyPensToBatchRequest true "待分配的猪栏ID列表"
|
||||
// @Success 200 {object} controller.Response "分配成功"
|
||||
// @Router /api/v1/pig-batches/{id}/assign-pens [post]
|
||||
// @Router /api/v1/pig-batches/assign-pens/{id} [post]
|
||||
func (c *PigBatchController) AssignEmptyPensToBatch(ctx *gin.Context) {
|
||||
const action = "为猪批次分配空栏"
|
||||
var req dto.AssignEmptyPensToBatchRequest
|
||||
@@ -168,7 +168,7 @@ func (c *PigBatchController) AssignEmptyPensToBatch(ctx *gin.Context) {
|
||||
// @Param fromBatchID path int true "源猪批次ID"
|
||||
// @Param body body dto.ReclassifyPenToNewBatchRequest true "划拨请求信息 (包含目标批次ID、猪栏ID和备注)"
|
||||
// @Success 200 {object} controller.Response "划拨成功"
|
||||
// @Router /api/v1/pig-batches/{fromBatchID}/reclassify-pen [post]
|
||||
// @Router /api/v1/pig-batches/reclassify-pen/{fromBatchID} [post]
|
||||
func (c *PigBatchController) ReclassifyPenToNewBatch(ctx *gin.Context) {
|
||||
const action = "划拨猪栏到新批次"
|
||||
var req dto.ReclassifyPenToNewBatchRequest
|
||||
@@ -199,7 +199,7 @@ func (c *PigBatchController) ReclassifyPenToNewBatch(ctx *gin.Context) {
|
||||
// @Param batchID path int true "猪批次ID"
|
||||
// @Param penID path int true "待移除的猪栏ID"
|
||||
// @Success 200 {object} controller.Response "移除成功"
|
||||
// @Router /api/v1/pig-batches/{batchID}/remove-pen/{penID} [delete]
|
||||
// @Router /api/v1/pig-batches/remove-pen/{penID}/{batchID} [delete]
|
||||
func (c *PigBatchController) RemoveEmptyPenFromBatch(ctx *gin.Context) {
|
||||
const action = "从猪批次移除空栏"
|
||||
|
||||
@@ -235,7 +235,7 @@ func (c *PigBatchController) RemoveEmptyPenFromBatch(ctx *gin.Context) {
|
||||
// @Param id path int true "猪批次ID"
|
||||
// @Param body body dto.MovePigsIntoPenRequest true "移入猪只请求信息 (包含目标猪栏ID、数量和备注)"
|
||||
// @Success 200 {object} controller.Response "移入成功"
|
||||
// @Router /api/v1/pig-batches/{id}/move-pigs-into-pen [post]
|
||||
// @Router /api/v1/pig-batches/move-pigs-into-pen/{id} [post]
|
||||
func (c *PigBatchController) MovePigsIntoPen(ctx *gin.Context) {
|
||||
const action = "将猪只移入猪栏"
|
||||
var req dto.MovePigsIntoPenRequest
|
||||
|
||||
Reference in New Issue
Block a user