更新swag

This commit is contained in:
2025-11-22 17:00:49 +08:00
parent 21f71317fb
commit 21cfa50011
2 changed files with 115 additions and 60 deletions

View File

@@ -2900,6 +2900,64 @@
}
}
},
"/api/v1/feed/raw-materials/{id}/nutrients": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据原料ID替换其所有的营养成分信息。这是一个覆盖操作。",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"饲料管理"
],
"summary": "全量更新原料的营养成分",
"parameters": [
{
"type": "integer",
"description": "原料ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "新的营养成分列表",
"name": "nutrients",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.UpdateRawMaterialNutrientsRequest"
}
}
],
"responses": {
"200": {
"description": "业务码为200代表更新成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controller.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.RawMaterialResponse"
}
}
}
]
}
}
}
}
},
"/api/v1/monitor/device-command-logs": {
"get": {
"security": [
@@ -7363,9 +7421,6 @@
"dto.NutrientResponse": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
@@ -7381,9 +7436,6 @@
"items": {
"$ref": "#/definitions/dto.NutrientRawMaterialDTO"
}
},
"updated_at": {
"type": "string"
}
}
},
@@ -7456,9 +7508,6 @@
"dto.PigAgeStageResponse": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
@@ -7467,9 +7516,6 @@
},
"name": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
@@ -7662,9 +7708,6 @@
"breed_disadvantages": {
"type": "string"
},
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
@@ -7676,9 +7719,6 @@
},
"parent_info": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
@@ -7699,9 +7739,6 @@
"dto.PigNutrientRequirementDTO": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
@@ -7719,9 +7756,6 @@
"nutrient_name": {
"description": "营养素名称",
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
@@ -7900,9 +7934,6 @@
"description": "猪品种名称",
"type": "string"
},
"created_at": {
"type": "string"
},
"daily_feed_intake": {
"type": "number"
},
@@ -7933,9 +7964,6 @@
"items": {
"$ref": "#/definitions/dto.PigNutrientRequirementDTO"
}
},
"updated_at": {
"type": "string"
}
}
},
@@ -8047,9 +8075,6 @@
"dto.RawMaterialNutrientDTO": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
@@ -8060,21 +8085,32 @@
"description": "营养素名称",
"type": "string"
},
"updated_at": {
"type": "string"
},
"value": {
"description": "营养价值含量",
"type": "number"
}
}
},
"dto.RawMaterialNutrientItem": {
"type": "object",
"required": [
"nutrient_id"
],
"properties": {
"nutrient_id": {
"description": "营养素ID",
"type": "integer"
},
"value": {
"description": "含量值必须大于等于0",
"type": "number",
"minimum": 0
}
}
},
"dto.RawMaterialResponse": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
@@ -8090,9 +8126,6 @@
"items": {
"$ref": "#/definitions/dto.RawMaterialNutrientDTO"
}
},
"updated_at": {
"type": "string"
}
}
},
@@ -8986,6 +9019,20 @@
}
}
},
"dto.UpdateRawMaterialNutrientsRequest": {
"type": "object",
"required": [
"nutrients"
],
"properties": {
"nutrients": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.RawMaterialNutrientItem"
}
}
}
},
"dto.UpdateRawMaterialRequest": {
"type": "object",
"required": [
@@ -9265,10 +9312,10 @@
"models.Operator": {
"type": "string",
"enum": [
"\u003c",
"\u003c=",
"\u003e",
"\u003e=",
"\u003C",
"\u003C=",
"\u003E",
"\u003E=",
"=",
"!="
],