MarketingSystemDataExportTool/grpc/card/cardv1/order.proto

304 lines
6.0 KiB
Protocol Buffer
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package api.inner;
import "card/cardv1/global.proto";
option go_package = "./card/cardv1;cardv1";
service Order {
// 商户平台用的创建订单
rpc CreateFromMerchant (CreateFromMerchantRequest) returns (CreateFromMerchantReply) {}
// 获取最近购买订单数据
rpc GetLastOrder(GetLastOrderRequest) returns (GetLastOrderReply) {}
// 发送订单卡密
rpc SendCards(SendCardsRequest) returns (SendCardsReply) {}
// 支付订单列表
rpc PayOrderList(PayOrderListRequest) returns (PayOrderListReply) {}
// 子订单列表
rpc ResellerOrderList(ResellerOrderListRequest) returns (ResellerOrderListReply) {}
// grpc用的重新提交订单
rpc ResubmitFromMerchant (ResubmitFromMerchantRequest) returns (CreateFromMerchantReply) {}
// grpc子订单统计
rpc ResellerOrderStatistics (ResellerOrderStatisticsRequest) returns (ResellerOrderStatisticsReply) {}
// 根据子订单发送订单卡密
rpc SendCardsByResellerOrder(SendCardsByResellerOrderRequest) returns (SendCardsByResellerOrderReply) {}
// GetLogs 获取日志
rpc GetLogs(GetLogsRequest) returns (GetLogsReply) {}
// GetLastLogs 获取日志
rpc GetLastLogs(GetLastLogsRequest) returns (GetLogsReply) {}
}
message GetLogsRequest {
// 订单号不传此项则payOrderNo为必传
string orderNo = 1;
// 支付单号
string payOrderNo = 2;
// 类型
repeated uint32 types = 3;
// 分销商id如果传了此项会限制单号与分销商的匹配
uint32 resellerId = 4;
// 是否只查询支付单日志只有payOrderNo不为空时有效
bool isOnlyPayOrder = 5;
}
message GetLogsReply {
repeated Item list = 1;
message Item {
uint32 id = 1;
string createdAt = 2;
string orderNo = 5;
uint32 orderId = 6;
uint32 type = 7;
string content = 8;
string remark = 9;
uint32 userId = 10;
int32 payOrderId = 11;
ExtData extData = 12;
}
message ExtData {
string mobile = 1;
repeated string emails = 2;
}
}
message GetLastLogsRequest {
// 支付单号
repeated string payOrderNos = 1;
// 类型
repeated uint32 types = 2;
// 分销商id如果传了此项会限制单号与分销商的匹配
uint32 resellerId = 3;
// 是否只查询支付单日志只有payOrderNo不为空时有效
bool isOnlyPayOrder = 4;
}
message SendCardsByResellerOrderRequest {
// 子订单号
string orderNo = 1;
// 分销商id
int32 resellerId = 2;
// 手机号
string mobile = 3;
// 邮箱
repeated string emails = 4;
}
message SendCardsByResellerOrderReply {}
message ResellerOrderStatisticsRequest {
// 支付订单id
uint32 payOrderId = 1;
// 支付订单号
string payOrderNo = 2;
}
message ResellerOrderStatisticsReply{
// 总数
uint32 totalNum = 1;
// 处理中数量
uint32 processingNum = 2;
// 处理成功数量
uint32 successNum = 3;
uint32 failNum = 4;
}
message ResubmitFromMerchantRequest {
// 支付订单id
uint32 payOrderId = 1;
// 子订单id
uint32 resellerOrderId = 2;
// 商户id
uint32 resellerId = 3;
}
message CreateFromMerchantRequest {
// 分销商ID
uint32 reseller_id = 1;
// 商品
repeated Goods goods_list = 2;
// 手机号
string mobile = 3;
// 邮箱
repeated string emails = 4;
// 账户id
int32 accountId = 5;
message Goods {
// 授权商品Id
string systemGoodsCode = 1;
// 数量
uint32 num = 2;
}
}
message CreateFromMerchantReply {
// 支付订单号
string pay_order_no = 1;
// 子订单号列表
repeated ResellerOrder reseller_order_list = 2;
message ResellerOrder {
// 子订单号
string order_no = 1;
}
}
message GetLastOrderRequest {
// 分销商id
uint32 reseller_id = 1;
// 订单来源1-API采购2-前台批采3-手工新增
repeated uint32 from_types = 2;
}
message GetLastOrderReply {
// 订单列表
repeated Order orderList = 1;
// 订单信息
message Order {
// 订单ID
uint32 Id = 1;
// 订单号
string order_number = 2;
// 订单创建时间
string created_at = 3;
// 购买数量
uint32 num = 4;
// 系统商品信息
SystemGoods system_goods = 5;
// 品牌商品信息
BrandGoods brand_goods = 6;
// 系统商品
message SystemGoods {
// 系统商品编码
string code = 1;
// 系统商品编码Id
uint32 id = 2;
}
// 品牌商品
message BrandGoods {
// 品牌商品名称
string name = 1;
// 品牌logo
string brand_logo = 2;
// 品牌ID
uint32 brand_id = 3;
// 权益等级
uint32 rightsId = 4;
}
}
}
message SendCardsRequest {
// 父订单号
string orderNo = 1;
// 分销商id
uint32 resellerId = 2;
// 手机号
string mobile = 3;
// 邮箱
repeated string emails = 4;
}
message SendCardsReply {
}
message PayOrderListRequest {
PageReq page = 1;
// 系统商品id
int32 systemGoodsId = 2;
// 支付订单号
string payOrderNo = 3;
// 子订单号
string resellerOrderNo = 4;
// 卡密
string cardPwd = 5;
// 分销商ID
uint32 resellerId = 6;
// 开始时间
repeated string createdAt = 7;
// 下游商品id
int32 resellerGoodsId = 8;
// 订单来源
repeated PayOrderFromType fromType = 13;
// 业务类型 0全部 1正常订单 2卡密转直充 3按采购结算 4虚拟仓出库
repeated PayOrderBusinessType businessType = 9;
}
message PayOrderListReply {
PageReply page = 1;
repeated PayOrderItem items = 2;
}
message ResellerOrderListRequest {
PageReq page = 1;
// 系统商品id
string goodsKeyword = 2;
// 支付订单号
string payOrderNo = 3;
// 子订单号
string resellerOrderNo = 4;
// 卡密
string cardPwd = 5;
// 分销商id
uint32 resellerId = 6;
// 卡号
string cardNo = 7;
// 系统商品id
int32 systemGoodsId = 8;
// 状态 1处理中 2 处理成功 3 处理失败
ResellerOrderRequestStatus status = 9;
// 支付订单id
uint32 payOrderId = 10;
// 下游商品id
int32 resellerGoodsId = 11;
// 商户订单号
string outOrderNo = 12;
// 商户订单来源
repeated ResellerOrderFromType fromType = 13;
// 开始时间
repeated string createdAt = 14;
repeated PayOrderBusinessType businessType = 15;
}
message ResellerOrderListReply {
PageReply page = 1;
repeated ResellerOrderEntity items = 2;
}