调整swag

This commit is contained in:
2025-10-06 22:26:57 +08:00
parent 035da5293b
commit 18b45b223c
4 changed files with 0 additions and 272 deletions

View File

@@ -34,8 +34,6 @@ func NewPigBatchController(logger *logs.Logger, service service.PigBatchService)
// @Produce json
// @Param body body dto.PigBatchCreateDTO true "猪批次信息"
// @Success 201 {object} controller.Response{data=dto.PigBatchResponseDTO} "创建成功"
// @Failure 400 {object} controller.Response "请求参数错误"
// @Failure 500 {object} controller.Response "内部服务器错误"
// @Router /api/v1/pig-batches [post]
func (c *PigBatchController) CreatePigBatch(ctx *gin.Context) {
const action = "创建猪批次"
@@ -64,9 +62,6 @@ func (c *PigBatchController) CreatePigBatch(ctx *gin.Context) {
// @Produce json
// @Param id path int true "猪批次ID"
// @Success 200 {object} controller.Response{data=dto.PigBatchResponseDTO} "获取成功"
// @Failure 400 {object} controller.Response "无效的ID格式"
// @Failure 404 {object} controller.Response "猪批次不存在"
// @Failure 500 {object} controller.Response "内部服务器错误"
// @Router /api/v1/pig-batches/{id} [get]
func (c *PigBatchController) GetPigBatch(ctx *gin.Context) {
const action = "获取猪批次"
@@ -99,9 +94,6 @@ func (c *PigBatchController) GetPigBatch(ctx *gin.Context) {
// @Param id path int true "猪批次ID"
// @Param body body dto.PigBatchUpdateDTO true "猪批次信息"
// @Success 200 {object} controller.Response{data=dto.PigBatchResponseDTO} "更新成功"
// @Failure 400 {object} controller.Response "请求参数错误或无效的ID格式"
// @Failure 404 {object} controller.Response "猪批次不存在"
// @Failure 500 {object} controller.Response "内部服务器错误"
// @Router /api/v1/pig-batches/{id} [put]
func (c *PigBatchController) UpdatePigBatch(ctx *gin.Context) {
const action = "更新猪批次"
@@ -138,9 +130,6 @@ func (c *PigBatchController) UpdatePigBatch(ctx *gin.Context) {
// @Produce json
// @Param id path int true "猪批次ID"
// @Success 200 {object} controller.Response "删除成功"
// @Failure 400 {object} controller.Response "无效的ID格式"
// @Failure 404 {object} controller.Response "猪批次不存在"
// @Failure 500 {object} controller.Response "内部服务器错误"
// @Router /api/v1/pig-batches/{id} [delete]
func (c *PigBatchController) DeletePigBatch(ctx *gin.Context) {
const action = "删除猪批次"
@@ -170,7 +159,6 @@ func (c *PigBatchController) DeletePigBatch(ctx *gin.Context) {
// @Produce json
// @Param is_active query bool false "是否活跃 (true/false)"
// @Success 200 {object} controller.Response{data=[]dto.PigBatchResponseDTO} "获取成功"
// @Failure 500 {object} controller.Response "内部服务器错误"
// @Router /api/v1/pig-batches [get]
func (c *PigBatchController) ListPigBatches(ctx *gin.Context) {
const action = "获取猪批次列表"
@@ -200,10 +188,6 @@ func (c *PigBatchController) ListPigBatches(ctx *gin.Context) {
// @Param id path int true "猪批次ID"
// @Param body body dto.PigBatchUpdatePensRequest true "猪批次关联的猪栏ID列表"
// @Success 200 {object} controller.Response "更新成功"
// @Failure 400 {object} controller.Response "请求参数错误或无效的ID格式"
// @Failure 404 {object} controller.Response "猪批次或猪栏不存在"
// @Failure 409 {object} controller.Response "业务逻辑冲突 (如猪栏已被使用)"
// @Failure 500 {object} controller.Response "内部服务器错误"
// @Router /api/v1/pig-batches/{id}/pens [put]
func (c *PigBatchController) UpdatePigBatchPens(ctx *gin.Context) {
const action = "更新猪批次关联猪栏"