From 5457172969191bbe25419d2c3e57899a72f9ecd4 Mon Sep 17 00:00:00 2001 From: univero <1449610641@qq.com> Date: Wed, 4 Dec 2024 15:27:04 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BA=86openapi-?= =?UTF-8?q?charge=E7=9A=84=E6=9F=A5=E8=AF=A2=E6=8A=98=E6=89=A3=E5=8F=8A?= =?UTF-8?q?=E6=8A=98=E6=89=A3=E5=90=8E=E4=BB=B7=E6=A0=BC=E7=9A=84rpc?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20feat:=20=E6=B7=BB=E5=8A=A0=E4=BA=86openapi?= =?UTF-8?q?-core-api=E6=9F=A5=E8=AF=A2=E4=BB=B7=E6=A0=BC=E7=9A=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- essay/show/common.proto | 38 +++++++++++++++++++++++++++------ essay/show/show.proto | 8 +++++++ openapi/charge/charge.proto | 1 + openapi/charge/interface.proto | 13 +++++++++++ openapi/core_api/common.proto | 12 ++++++++++- openapi/core_api/core_api.proto | 3 +++ 6 files changed, 67 insertions(+), 8 deletions(-) diff --git a/essay/show/common.proto b/essay/show/common.proto index d18a2cf..4d86c74 100644 --- a/essay/show/common.proto +++ b/essay/show/common.proto @@ -59,6 +59,10 @@ message GetUserInfoResp { Payload payload = 3; } +// 更新用户信息 +message UpdateUserInfoReq { + string username = 1; +} /* * 作文批改相关 @@ -69,7 +73,7 @@ message EssayEvaluateReq { string title = 1; string text = 2; int64 grade = 3; - string ocr = 4; + repeated string ocr = 4; } // 批改作文的响应 @@ -93,14 +97,34 @@ message GetEssayEvaluateLogsResp { message Log { string id = 1; int64 grade = 2; - string ocr = 3; + repeated string ocr = 3; string response = 4; int64 createTime = 5; } +// 获取加签后url +message ApplySignedUrlReq { + optional string prefix = 1; + optional string suffix = 2; +} + +message ApplySignedUrlResp { + string url = 1; + string sessionToken = 2; +} + +// 调用OCR接口 +message OCRReq { + repeated string ocr = 1; +} + +message OCRResp { + string title = 1; + string text = 2; +} + // 响应 -//message Response { -// bool done = 1; -// string msg = 2; -//} -// \ No newline at end of file +message Response { + int64 code = 1; + string msg = 2; +} diff --git a/essay/show/show.proto b/essay/show/show.proto index 46142ab..e011e8d 100644 --- a/essay/show/show.proto +++ b/essay/show/show.proto @@ -31,4 +31,12 @@ service show { rpc GetEvaluateLogs(GetEssayEvaluateLogsReq) returns (GetEssayEvaluateLogsResp) { option (http.post) = "/essay/logs"; } + // 获取ocr + rpc OCR(OCRReq) returns (OCRResp) { + option (http.post) = "/sts/ocr"; + } + // 获取加签后url + rpc ApplySignedUrl(ApplySignedUrlReq) returns (ApplySignedUrlResp) { + option (http.post) = "/sts/apply"; + } } \ No newline at end of file diff --git a/openapi/charge/charge.proto b/openapi/charge/charge.proto index 746bd73..3ee824b 100644 --- a/openapi/charge/charge.proto +++ b/openapi/charge/charge.proto @@ -45,6 +45,7 @@ service charge { rpc CreateGradient(CreateGradientReq) returns (CreateGradientResp); rpc UpdateGradient(UpdateGradientReq) returns (UpdateGradientResp); rpc GetGradient(GetGradientReq) returns (GetGradientResp); + rpc GetAmount(GetAmountReq) returns (GetAmountResp); /* * log.proto diff --git a/openapi/charge/interface.proto b/openapi/charge/interface.proto index 1667ae9..88dbdd2 100644 --- a/openapi/charge/interface.proto +++ b/openapi/charge/interface.proto @@ -240,4 +240,17 @@ message GetGradientReq { // 获取梯度折扣响应 message GetGradientResp { Gradient gradient = 1; +} + +// 计算价格请求 +message GetAmountReq { + int64 increment = 1; + string baseInfId = 2; +} + +// 计算价格响应 +message GetAmountResp { + int64 rate = 1; // 折扣程度 + int64 originAmount = 2; // 原始价格 + int64 amount = 3; // 折后价格 } \ No newline at end of file diff --git a/openapi/core_api/common.proto b/openapi/core_api/common.proto index d1a1f7a..d1c9e2d 100644 --- a/openapi/core_api/common.proto +++ b/openapi/core_api/common.proto @@ -182,7 +182,7 @@ message GetFullInterfacesResp { message BuyFullInterfaceReq { string fullInterfaceId = 1; // 如果之前没有买过则为模板的id,若买过则是用户的id int64 increment = 2; // 购买的量 - bool discount = 3; // 是否有折扣 + // bool discount = 3; // 是否有折扣不应该是前端的参数,而是下游服务根据数据库判断 } @@ -205,6 +205,16 @@ message GetGradientReq { message GetGradientResp { charge.Gradient gradient = 1; } +message GetAmountReq { + int64 increment = 1; + string baseInfId = 2; +} +// 计算价格响应 +message GetAmountResp { + int64 rate = 1; // 折扣程度 + int64 originAmount = 2; // 原始价格 + int64 amount = 3; // 折后价格 +} // 获取调用记录请求 diff --git a/openapi/core_api/core_api.proto b/openapi/core_api/core_api.proto index 21b60d3..ed168db 100644 --- a/openapi/core_api/core_api.proto +++ b/openapi/core_api/core_api.proto @@ -138,6 +138,9 @@ service charge { rpc GetGradient(GetGradientReq) returns (GetGradientResp) { option (http.get) = "/gradient/get"; } + rpc GetAmount(GetAmountReq) returns (GetAmountResp) { + option (http.post) = "/gradient/amount"; + } } service call { From 586657f69044af768df54bef14bc14835ea81a91 Mon Sep 17 00:00:00 2001 From: univero <1449610641@qq.com> Date: Wed, 4 Dec 2024 15:39:54 +0800 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BA=86?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=EF=BC=8C=E4=BB=A5=E4=BE=BF=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E8=A7=A6=E5=8F=91action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openapi/core_api/common.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/core_api/common.proto b/openapi/core_api/common.proto index d1c9e2d..1e1655b 100644 --- a/openapi/core_api/common.proto +++ b/openapi/core_api/common.proto @@ -212,8 +212,8 @@ message GetAmountReq { // 计算价格响应 message GetAmountResp { int64 rate = 1; // 折扣程度 - int64 originAmount = 2; // 原始价格 - int64 amount = 3; // 折后价格 + int64 originAmount = 2; // 原始价格,如果要扣除则一律给出负数 + int64 amount = 3; // 折后价格,如果要扣除则一律给出负数 } From cbc602832ef57fdf79709fc17b39baf37b29d1d3 Mon Sep 17 00:00:00 2001 From: univero <1449610641@qq.com> Date: Wed, 4 Dec 2024 15:59:51 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix:=20=E8=AE=A1=E7=AE=97=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E9=80=9A=E8=BF=87fullInfId=EF=BC=8C=E5=90=A6?= =?UTF-8?q?=E5=88=99=E6=97=A0=E6=B3=95=E7=9F=A5=E6=99=93=E5=8D=95=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openapi/charge/interface.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/charge/interface.proto b/openapi/charge/interface.proto index 88dbdd2..480975e 100644 --- a/openapi/charge/interface.proto +++ b/openapi/charge/interface.proto @@ -245,7 +245,7 @@ message GetGradientResp { // 计算价格请求 message GetAmountReq { int64 increment = 1; - string baseInfId = 2; + string fullInfId = 2; } // 计算价格响应 From 8bd8973c8c517dab3c1a052ff5371bc99566dec8 Mon Sep 17 00:00:00 2001 From: univero <1449610641@qq.com> Date: Wed, 4 Dec 2024 16:13:50 +0800 Subject: [PATCH 4/7] =?UTF-8?q?fix:=20core-api=E5=B1=82=E4=B9=9F=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E8=AE=A1=E7=AE=97=E4=BB=B7=E6=A0=BC=E9=80=9A=E8=BF=87?= =?UTF-8?q?fullInfId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openapi/core_api/common.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/core_api/common.proto b/openapi/core_api/common.proto index 1e1655b..f7ce128 100644 --- a/openapi/core_api/common.proto +++ b/openapi/core_api/common.proto @@ -207,7 +207,7 @@ message GetGradientResp { } message GetAmountReq { int64 increment = 1; - string baseInfId = 2; + string fullInfId = 2; } // 计算价格响应 message GetAmountResp { From 96cb50a02d7a7d895a0489fadbbac9ad48f14b28 Mon Sep 17 00:00:00 2001 From: univero <1449610641@qq.com> Date: Thu, 5 Dec 2024 16:17:10 +0800 Subject: [PATCH 5/7] =?UTF-8?q?feat:=20=E5=9C=A8show=E4=B8=AD=E5=B0=81?= =?UTF-8?q?=E8=A3=85=E4=BA=86=E4=B8=80=E4=B8=AA=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- essay/show/common.proto | 7 +++++++ essay/show/show.proto | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/essay/show/common.proto b/essay/show/common.proto index 4d86c74..0b379c9 100644 --- a/essay/show/common.proto +++ b/essay/show/common.proto @@ -128,3 +128,10 @@ message Response { int64 code = 1; string msg = 2; } + +// 发送验证码请求 +message SendVerifyCodeReq { + string authType = 1; + string authId = 2; + int64 type = 3; +} \ No newline at end of file diff --git a/essay/show/show.proto b/essay/show/show.proto index e011e8d..d3beeab 100644 --- a/essay/show/show.proto +++ b/essay/show/show.proto @@ -39,4 +39,8 @@ service show { rpc ApplySignedUrl(ApplySignedUrlReq) returns (ApplySignedUrlResp) { option (http.post) = "/sts/apply"; } + // 发送验证码 + rpc SendVerifyCode(SendVerifyCodeReq) returns (Response) { + option (http.post) = "/sts/send_verify_code"; + } } \ No newline at end of file From 47d1f5c99ffc506237e0b64ad2294a366134c22d Mon Sep 17 00:00:00 2001 From: univero <1449610641@qq.com> Date: Mon, 9 Dec 2024 14:32:51 +0800 Subject: [PATCH 6/7] =?UTF-8?q?feat:=20=E7=BB=99=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E3=80=81=E6=B3=A8=E5=86=8C=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=80=BC=E6=B7=BB=E5=8A=A0=E4=BA=86name=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=9B=E7=BB=99=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=B7=BB=E5=8A=A0=E7=94=B5=E8=AF=9D=E5=8F=B7=E7=A0=81?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- essay/show/common.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/essay/show/common.proto b/essay/show/common.proto index 0b379c9..e27c8af 100644 --- a/essay/show/common.proto +++ b/essay/show/common.proto @@ -27,6 +27,7 @@ message SignUpResp { string id = 1; string accessToken = 2; int64 accessExpire = 3; + string name = 4; } // 登录请求 @@ -42,6 +43,7 @@ message SignInResp { string id = 1; string accessToken = 2; int64 accessExpire = 3; + string name = 4; } // 获取用户信息请求 @@ -53,6 +55,7 @@ message GetUserInfoResp { message Payload { string name = 1; int64 count = 2; + string phone = 3; } int64 code = 1; string msg = 2; From 63711beb06419f68108f7ee57ffc00ed7a8a4a1f Mon Sep 17 00:00:00 2001 From: univero <1449610641@qq.com> Date: Mon, 9 Dec 2024 22:04:23 +0800 Subject: [PATCH 7/7] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BA=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81=E7=9A=84=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- essay/show/common.proto | 16 +++++++++++++++- essay/show/show.proto | 8 ++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/essay/show/common.proto b/essay/show/common.proto index e27c8af..95ce80b 100644 --- a/essay/show/common.proto +++ b/essay/show/common.proto @@ -64,7 +64,21 @@ message GetUserInfoResp { // 更新用户信息 message UpdateUserInfoReq { - string username = 1; + string name = 1; +} + +// 修改密码请求 +message UpdatePasswordReq { + string verifyCode = 1; + string password = 2; +} + +// 修改密码相应 +message UpdatePasswordResp { + string id = 1; + string accessToken = 2; + int64 accessExpire = 3; + string name = 4; } /* diff --git a/essay/show/show.proto b/essay/show/show.proto index d3beeab..5ab35f7 100644 --- a/essay/show/show.proto +++ b/essay/show/show.proto @@ -23,6 +23,14 @@ service show { rpc GetUserInfo(GetUserInfoReq) returns (GetUserInfoResp) { option (http.get) = "/user/info"; } + // 更新用户密码 + rpc UpdatePassword(UpdatePasswordReq) returns (UpdatePasswordReq) { + option(http.post) = "/user/update_password"; + } + // 更新用户信息 + rpc UpdateUserInfo(UpdateUserInfoReq) returns (Response) { + option(http.post) = "/user/update"; + } // 文本作文批改 rpc EssayEvaluate(EssayEvaluateReq) returns (EssayEvaluateResp) { option (http.post) = "/essay/evaluate";