refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
package wallet;
|
||||
option go_package = ".;wallet";
|
||||
option go_package = "bsm/full/module/finance/wallet/pb;wallet";
|
||||
|
||||
service Alipay {
|
||||
//支付宝wap支付
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package wallet;
|
||||
option go_package = ".;wallet";
|
||||
|
||||
message FetchRequest {
|
||||
int64 page_no=1; // 页数
|
||||
int64 page_size=2; // 每页记录数
|
||||
map<string,string> params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11
|
||||
}
|
||||
|
||||
message IdentRequest{
|
||||
int64 id = 1; // 唯一ID
|
||||
string identity = 2; // 唯一码
|
||||
}
|
||||
|
||||
message VersionRequest {
|
||||
int64 version=1; // 时序版本号
|
||||
}
|
||||
|
||||
|
||||
message SearchRequest {
|
||||
string keyword=1; //关键词
|
||||
}
|
||||
|
||||
|
||||
message StatusReply{
|
||||
int32 code=1; // 状态码
|
||||
string message=2; // 状态说明
|
||||
string details=3; // 数据
|
||||
int64 timeseq=4; // 响应时间序列
|
||||
}
|
||||
|
||||
|
||||
message Empty{
|
||||
}
|
||||
@@ -1,25 +1,25 @@
|
||||
syntax = "proto3";
|
||||
package wallet;
|
||||
option go_package = ".;wallet";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/finance/wallet/pb;wallet";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
service Payment {
|
||||
rpc Hello(Empty) returns (PaymentReply) {}
|
||||
rpc Hello(blocks.Empty) returns (PaymentReply) {}
|
||||
|
||||
//获取平台支持的支付网关
|
||||
rpc Way(WayRequest) returns (WayReply) {}
|
||||
|
||||
//获取支付的详情
|
||||
rpc Get(IdentRequest) returns (PaymentItem){}
|
||||
|
||||
rpc Get(blocks.IdentRequest) returns (PaymentItem){}
|
||||
|
||||
//支付-电商订单
|
||||
rpc ByOrder (OrderRequest) returns (PaymentReply) {};
|
||||
|
||||
//支付-充值
|
||||
rpc ByCharge (ChargeRequest) returns (PaymentReply) {};
|
||||
rpc ByCharge (ChargeRequest) returns (PaymentReply) {};
|
||||
|
||||
//回调更新支付的结果和状态
|
||||
rpc Callback (CallbackRequest) returns (StatusReply) {};
|
||||
rpc Callback (CallbackRequest) returns (blocks.StatusReply) {};
|
||||
}
|
||||
|
||||
message WayRequest {
|
||||
@@ -52,7 +52,7 @@ message ChargeRequest {
|
||||
string remark = 2; //备注
|
||||
int32 pay_channel = 3; //支付模型:WECHAT,ALIPAY
|
||||
string pay_type = 4; //支付类型 JSAPI:微信浏览器内支付 APP:app支付 MWEB:H5支付 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付
|
||||
|
||||
|
||||
string desc=5; //支付描述
|
||||
string open_id=6; //微信用户的OpenID
|
||||
}
|
||||
@@ -75,6 +75,6 @@ message CallbackRequest {
|
||||
}
|
||||
|
||||
message PaymentReply {
|
||||
int64 code =1;
|
||||
int64 code =1;
|
||||
map<string,string> result =2; //预支付返回
|
||||
}
|
||||
@@ -1,33 +1,33 @@
|
||||
syntax = "proto3";
|
||||
package wallet;
|
||||
option go_package = ".;wallet";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/finance/wallet/pb;wallet";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
service Basic {
|
||||
//获取钱包信息
|
||||
rpc GetWallet(GetWalletRequest) returns (GetWalletReply) {}
|
||||
|
||||
//设置支付密码
|
||||
rpc SetPayPassword(SetPayPasswordRequest) returns (StatusReply) {}
|
||||
rpc SetPayPassword(SetPayPasswordRequest) returns (blocks.StatusReply) {}
|
||||
|
||||
//绑定微信或支付宝账户
|
||||
rpc BindPaymentId(BindPaymentIDRequest) returns (StatusReply) {}
|
||||
rpc BindPaymentId(BindPaymentIDRequest) returns (blocks.StatusReply) {}
|
||||
|
||||
//查询交易记录
|
||||
rpc Transactions(TransactionsRequest) returns (TransactionsReply) {}
|
||||
|
||||
|
||||
|
||||
//添加银行卡
|
||||
rpc AddBankCard (AddBankCardRequest) returns (StatusReply) {};
|
||||
rpc AddBankCard (AddBankCardRequest) returns (blocks.StatusReply) {};
|
||||
|
||||
//获取用户银行卡列表
|
||||
rpc GetBankCard (FinanceEmpty) returns (GetBankCardReply) {};
|
||||
rpc GetBankCard (FinanceEmpty) returns (GetBankCardReply) {};
|
||||
|
||||
//删除银行卡
|
||||
rpc RmBankCard (RmBankCardRequest) returns (StatusReply) {};
|
||||
|
||||
rpc RmBankCard (RmBankCardRequest) returns (blocks.StatusReply) {};
|
||||
|
||||
//申请提现
|
||||
rpc ApplyCash (ApplyCashRequest) returns (StatusReply) {};
|
||||
rpc ApplyCash (ApplyCashRequest) returns (blocks.StatusReply) {};
|
||||
}
|
||||
|
||||
message GetWalletRequest {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
package wallet;
|
||||
option go_package = ".;wallet";
|
||||
option go_package = "bsm/full/module/finance/wallet/pb;wallet";
|
||||
service Wechat {
|
||||
//微信JSAPI下单
|
||||
rpc JsapiPreOrder(WxpayJSAPIPreOrderRequest) returns (WxpayJSAPIPreOrderReply) {}
|
||||
|
||||
Reference in New Issue
Block a user