-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
12,788 additions
and
359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include "../base/base.thrift" | ||
include "../base/pagination.thrift" | ||
include "model/author_model.thrift" | ||
namespace go sc_bff_api | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace go sc_bff_api | ||
|
||
|
||
//作者模型 | ||
struct AuthorDTO { | ||
1: i64 id //id | ||
2: i64 createTime //创建时间 | ||
3: i64 updateTime //编辑时间 | ||
4: string username //昵称 | ||
5: string realname //真名 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
include "../base/base.thrift" | ||
include "../base/pagination.thrift" | ||
include "model/column_model.thrift" | ||
namespace go sc_bff_api | ||
|
||
//请求体 | ||
struct ColumnOmnibusRequest { | ||
1: string authorName //作者名 | ||
2: string columnName //专栏名 | ||
3: i64 columnPrice //专栏价格 | ||
|
||
255: optional base.Base base //标准请求内容 | ||
} | ||
|
||
//响应体 | ||
struct ColumnOmnibusResponse { | ||
|
||
255: base.BaseResp baseResp //标准返回内容 | ||
|
||
|
||
} | ||
|
||
//专栏列表 请求体 | ||
struct ColumnPageRequest { | ||
1: i64 pageNum //当前页码 1基 | ||
2: i64 pageSize //每页大小 | ||
4: optional string name //名称 | ||
5: optional i64 authorId //作者id | ||
6: optional i32 status //状态 | ||
|
||
255: optional base.Base base //标准请求内容 | ||
} | ||
|
||
//专栏列表 响应体 | ||
struct ColumnPageResponse { | ||
1: list<column_model.RickColumnDTO> data //数据信息 | ||
2: pagination.Pagination pagination //分页指示器 | ||
|
||
255: base.BaseResp baseResp //标准返回内容 | ||
} | ||
|
||
//专栏详情 请求体 | ||
struct ColumnDetailRequest { | ||
1: i64 id //专栏Id | ||
|
||
255: optional base.Base base //标准请求内容 | ||
} | ||
|
||
//专栏详情 响应体 | ||
struct ColumnDetailResponse { | ||
1: column_model.ColumnDTO data //数据信息 | ||
|
||
255: base.BaseResp baseResp //标准返回内容 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
include "../../author/model/author_model.thrift" | ||
include "../../column_quote/model/column_quote_model.thrift" | ||
include "../../subscription/model/subscription_model.thrift" | ||
namespace go sc_bff_api | ||
|
||
|
||
//专栏模型 | ||
struct ColumnDTO { | ||
1: i64 id //id | ||
2: i64 createTime //创建时间 | ||
3: i64 updateTime //编辑时间 | ||
4: string name //名称 | ||
5: i64 authorId //作者id | ||
6: i32 status //状态 | ||
} | ||
|
||
|
||
//富专栏模型 | ||
struct RickColumnDTO { | ||
1: ColumnDTO column //专栏本身 | ||
2: author_model.AuthorDTO author //关联的作者 | ||
3: column_quote_model.ColumnQuoteDTO columnQuote //关联的报价 | ||
4: subscription_model.SubscriptionDTO subscription //关联的订阅情况 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include "../base/base.thrift" | ||
include "../base/pagination.thrift" | ||
include "model/column_quote_model.thrift" | ||
namespace go sc_bff_api | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace go sc_bff_api | ||
|
||
|
||
//专栏报价模型 | ||
struct ColumnQuoteDTO { | ||
1: i64 id //id | ||
2: i64 createTime //创建时间 | ||
3: i64 updateTime //编辑时间 | ||
4: i64 columnId //专栏id | ||
5: i64 editor //编辑id | ||
6: i64 price //价格 | ||
7: i32 status //状态 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace go sc_bff_api | ||
|
||
|
||
//支付单模型 | ||
struct PaymentDTO { | ||
1: i64 id //id | ||
2: i64 createTime //创建时间 | ||
3: i64 updateTime //编辑时间 | ||
|
||
4: string orderNo //订单编号 | ||
5: string method //支付方式 ALIPAY/WEIXIN 支付宝/微信 | ||
6: string thirdTransactionNo //支付平台订单号 | ||
7: i64 amount //金额(单位:分) | ||
8: i32 status //支付状态 0/1/2 未支付/已支付/已关闭 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
include "../base/base.thrift" | ||
include "../base/pagination.thrift" | ||
include "model/payment_model.thrift" | ||
namespace go sc_bff_api | ||
|
||
|
||
// 请求体 | ||
struct PaymentPaidCallbackRequest { | ||
1: string orderNo //订单编号 | ||
|
||
255: optional base.Base base //标准请求内容 | ||
} | ||
|
||
// 响应体 | ||
struct PaymentPaidCallbackResponse { | ||
1: payment_model.PaymentDTO payment //数据信息 | ||
|
||
255: base.BaseResp baseResp //标准返回内容 | ||
} |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
idl/reader/model/model.thrift → idl/reader/model/reader_model.thrift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
namespace go sc_misc_api | ||
namespace go sc_bff_api | ||
|
||
|
||
//读者模型 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,52 @@ | ||
include "./reader/reader_api.thrift" | ||
include "./editor/editor_api.thrift" | ||
include "./column/column_api.thrift" | ||
include "./payment/payment_api.thrift" | ||
namespace go sc_misc_api | ||
|
||
//定义misc应用中的所有RPC服务 | ||
service MiscService { | ||
|
||
|
||
//**************** 专栏START ****************// | ||
//演示接口 创建专栏等相关所有实体 | ||
column_api.ColumnOmnibusResponse ColumnOmnibus(1: column_api.ColumnOmnibusRequest request) | ||
|
||
//查看专栏列表 | ||
column_api.ColumnPageResponse ColumnPage(1: column_api.ColumnPageRequest request) | ||
|
||
//查看专栏详情 | ||
column_api.ColumnDetailResponse ColumnDetail(1: column_api.ColumnDetailRequest request) | ||
|
||
|
||
//**************** 专栏END ****************// | ||
|
||
|
||
//**************** 小编START ****************// | ||
|
||
//小编登录 | ||
editor_api.EditorLoginResponse EditorLogin(1: editor_api.EditorLoginRequest request) | ||
|
||
|
||
|
||
//**************** 小编END ****************// | ||
|
||
|
||
|
||
//**************** 读者START ****************// | ||
|
||
//读者登录 | ||
reader_api.ReaderLoginResponse ReaderLogin(1: reader_api.ReaderLoginRequest request) | ||
|
||
//编辑登录 | ||
editor_api.EditorLoginResponse EditorLogin(1: editor_api.EditorLoginRequest request) | ||
//**************** 读者END ****************// | ||
|
||
|
||
//**************** 支付单START ****************// | ||
|
||
//第三方支付平台,支付成功后的回调接口。 | ||
payment_api.PaymentPaidCallbackResponse PaymentPaidCallback(1: payment_api.PaymentPaidCallbackRequest request) | ||
|
||
|
||
//**************** 支付单END ****************// | ||
|
||
} |
3 changes: 1 addition & 2 deletions
3
idl/subscription/enums/enums.thrift → ...scription/enums/subscription_enums.thrift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
namespace go sc_misc_api | ||
|
||
namespace go sc_bff_api | ||
|
||
//订阅状态 | ||
enum SubscriptionStatus { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,2 @@ | ||
include "../base/base.thrift" | ||
include "../base/pagination.thrift" | ||
include "enums/enums.thrift" | ||
include "model/model.thrift" | ||
namespace go sc_misc_api | ||
|
||
//订阅列表 请求体 | ||
struct SubscriptionListRequest { | ||
1: i64 pageNum //当前页码 1基 | ||
2: i64 pageSize //每页大小 | ||
3: optional i64 readerId //读者id | ||
4: optional i64 columnId //专栏id | ||
5: optional i64 orderId //订单id | ||
6: optional i32 status //状态 | ||
|
||
255: optional base.Base base //标准请求内容 | ||
} | ||
|
||
//订阅列表 响应体 | ||
struct SubscriptionListResponse { | ||
1: list<model.SubscriptionDTO> data //数据信息 | ||
2: pagination.Pagination pagination //分页指示器 | ||
|
||
255: base.BaseResp baseResp //标准返回内容 | ||
|
||
} | ||
namespace go sc_bff_api |
Oops, something went wrong.