Skip to content

Commit f270001

Browse files
committed
chore: update
1 parent 6fc4cec commit f270001

File tree

1 file changed

+14
-37
lines changed

1 file changed

+14
-37
lines changed

campusapis/sklInfo/v1/skl.proto renamed to campusapis/skl/v1/skl.proto

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,10 @@
11
syntax = "proto3";
22

3-
package campusapis.sklInfo.v1;
3+
package campusapis.skl.v1;
44

55
import "google/api/annotations.proto";
6-
import "protoc-gen-openapiv2/options/annotations.proto";
7-
8-
option go_package = "./campusapis/sklInfo/v1";
9-
10-
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
11-
info: {
12-
title: "SklInfo API";
13-
version: "0.1";
14-
description: "SklInfo API";
15-
contact: {
16-
name: "hduhelp salmon base project";
17-
url: "https://github.com/hduhelp/salmon_api_base";
18-
19-
};
20-
license: {
21-
name: "BSD 3-Clause License";
22-
url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
23-
};
24-
};
25-
schemes: HTTPS;
26-
consumes: "application/json";
27-
produces: "application/json";
28-
};
29-
306

7+
option go_package = "./campusapis/skl/v1";
318

329

3310
//// Skl 数据库中的student_history_info表
@@ -67,35 +44,35 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
6744
// string StudentId = 11; // 学号
6845
//}
6946

70-
service SklInfoService {
47+
service SklService {
7148
// 获取某学院某年级的学生信息
72-
rpc GetSklUnitInfo(SklUnitInfoRequest) returns (SklUnitInfo) {
49+
rpc GetStaffUnitInfo(StaffUnitInfoRequest) returns (StaffUnitInfoResponse) {
7350
option (google.api.http) = {
74-
get: "/v1/sklInfo/unitInfo"
51+
get: "/skl/unitInfo"
7552
additional_bindings {
76-
get: "/sklInfo/unitInfo"
53+
get: "/skl/v1/unitInfo"
7754
}
7855
};
7956
}
8057
}
8158

8259
// 用于从Skl数据库中筛选某年级某学院的学生
8360
message SklUnitInfo {
84-
string UnitId = 1; // 学院ID
85-
string UnitName = 2; // 学院名称
86-
string Grade = 3; // 年级
87-
repeated string Teachers = 4; // 辅导员
88-
repeated string Students = 5; // 学生
61+
string unitId = 1; // 学院ID
62+
string unitName = 2; // 学院名称
63+
string grade = 3; // 年级
64+
repeated string teachers = 4; // 辅导员
65+
repeated string classNos = 5;
8966
}
9067

91-
message SklUnitInfoRequest {
68+
message StaffUnitInfoRequest {
9269
string StaffId = 1; // 学/工号
9370
}
9471

95-
message SklUnitInfoResponse {
72+
message StaffUnitInfoResponse {
9673
int32 error = 1;
9774
string msg = 2;
98-
SklUnitInfo sklUnitInfo = 3;
75+
repeated SklUnitInfo data = 3;
9976
}
10077

10178

0 commit comments

Comments
 (0)