From 872b17a00f8d252066d112b210c9068db3bd6e70 Mon Sep 17 00:00:00 2001 From: Jiahe114514 Date: Sat, 28 Feb 2026 18:55:20 +0800 Subject: [PATCH] feat: ModifyFitnessScore --- campusapis/staff/v1/campus.proto | 44 ++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/campusapis/staff/v1/campus.proto b/campusapis/staff/v1/campus.proto index 10375a0..0befed5 100644 --- a/campusapis/staff/v1/campus.proto +++ b/campusapis/staff/v1/campus.proto @@ -282,6 +282,18 @@ service CampusService { }; } + //修改已保存体测成绩 + rpc ModifyFitnessScore(ModifyFitnessScoreRequest) returns (FitnessScoreResponse) { + option (google.api.http) = { + put: "/staff/v1/fitness/score" + body: "*" + additional_bindings { + put: "/fitness/score" + body: "*" + } + }; + } + //查询已保存体测成绩列表 rpc ListFitnessScores(google.protobuf.Empty) returns (ListFitnessScoresResponse) { option (google.api.http) = { @@ -1046,17 +1058,6 @@ message FitnessScoreResponse { // DeleteFitnessScoreRequest 删除体测成绩请求 message DeleteFitnessScoreRequest { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: { - title: "DeleteFitnessScoreRequest" - description: "删除体测成绩请求体" - required: [ - "staffId", - "schoolYear", - "semester" - ] - } - }; string staffId = 1; string schoolYear = 2; string semester = 3; @@ -1094,4 +1095,25 @@ message ListFitnessScoresResponse { int32 error = 1; string msg = 2; repeated FitnessScore data = 3; +} + +// ModifyFitnessScoreRequest 修改体测成绩请求 +message ModifyFitnessScoreRequest { + string staffId = 1; + string schoolYear = 2; + string semester = 3; + string gender = 4; + int32 grade = 5; + float height = 6; + float weight = 7; + float bmi = 8; + float run50m = 9; + float standingLongJump = 10; + float sitAndReach = 11; + float run800m = 12; + float run1000m = 13; + int32 sitUps = 14; + int32 pullUps = 15; + int32 lungCapacity = 16; + float totalScore = 17; } \ No newline at end of file