refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,94 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package order;
|
||||
option go_package = "./order";
|
||||
|
||||
message Empty{
|
||||
}
|
||||
|
||||
message FetchRequest {
|
||||
int64 page_no=1 [json_name="page_no"]; // 页数
|
||||
int64 page_size=2 [json_name="page_size"]; // 每页记录数
|
||||
map<string,string> params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11
|
||||
}
|
||||
|
||||
message IdentRequest{
|
||||
int64 id = 1; // 唯一ID
|
||||
string identity = 2; // 唯一码
|
||||
string reason = 3;// 退款原因
|
||||
int32 approve = 4;// 状态:-2:未通过,0:默认 1:申请退款 2:申请退货 3:申请退款退货 4:申请通过
|
||||
string agency = 5 ;// 代理
|
||||
string store_identity = 6;// 店铺标识
|
||||
}
|
||||
|
||||
message StatusReply{
|
||||
int32 code = 1; // 状态码
|
||||
string identity=2; // 标识码
|
||||
string message=3; //状态说明
|
||||
int64 timeseq=4; // 响应时间序列
|
||||
string reason=5; // 退款原因
|
||||
}
|
||||
|
||||
|
||||
message OrderSummaryItem {
|
||||
int64 id = 1; // ID
|
||||
string order_no = 2 [json_name="order_no"]; // 订单编号
|
||||
int64 partner_id =3 [json_name="partner_id"]; // 合伙人ID
|
||||
string identity = 4; // 定单唯一标识
|
||||
int64 total_price = 7 [json_name="total_price"]; // 总价
|
||||
int64 trans_price = 8 [json_name="trans_price"]; // 交易金额
|
||||
int64 refund_price = 9 [json_name="refund_price"]; // 退款金额
|
||||
int64 logistics_fee = 11 [json_name="logistics_fee"]; // 物流费用
|
||||
int64 coupon_amount = 12 [json_name="coupon_amount"]; // 优惠券金额
|
||||
string remark = 13; // 备注
|
||||
int32 status = 14; // 订单状态:all全部订单,notarize确认中,sign签约中,signed签约完成,fulfil履约中,accomplish完成
|
||||
|
||||
string logistics_number = 15 [json_name="logistics_number"]; // 物流号
|
||||
string address_identity = 16 [json_name="address_identity"]; // 地址库唯一标识
|
||||
string county = 17; // 国家
|
||||
string province = 18; // 省
|
||||
string city = 19; // 市
|
||||
string area = 20; // 县
|
||||
string address = 21; // 详细地址
|
||||
string contact = 22; // 联系人
|
||||
string phone = 23; // 联系电话
|
||||
string delivery_time = 24 [json_name="delivery_time"]; // 配送时间
|
||||
string delivery_identity = 25 [json_name="delivery_identity"]; // 配送工作人员唯一标识
|
||||
|
||||
int32 pay_type = 26 [json_name="pay_type"]; // 支付类型:0:待支付,1:线下支付,2:微信 3:支付宝,4:余额
|
||||
int64 pay_amount = 27 [json_name="pay_amount"]; // 支付金额
|
||||
string pay_trade_no = 28 [json_name="pay_trade_no"]; // 支付交易号
|
||||
string pay_time = 29 [json_name="pay_time"]; // 支付时间
|
||||
string pay_remark = 30 [json_name="pay_remark"]; // 支付备注
|
||||
|
||||
string created = 31; // 创建时间
|
||||
string updated = 32; // 最后创建时间
|
||||
repeated OrderDetails details =33; //订单商品
|
||||
string addr = 34; // 简单地址信息
|
||||
string car_identity = 35 [json_name="car_identity"]; // 配送车辆唯一标识
|
||||
string delivery_address = 36 [json_name="delivery_address"]; // 配送地址
|
||||
string brand = 37; // 配送车辆品牌
|
||||
string version = 38; // 配送车辆型号
|
||||
string license_number = 39 [json_name="license_number"]; // 配送车辆车牌号
|
||||
string member_name = 40 [json_name="member_name"]; // 配送员姓名
|
||||
string member_phone = 41 [json_name="member_phone"]; // 配送员电话
|
||||
|
||||
int32 approve = 42;// 审批
|
||||
}
|
||||
|
||||
message OrderDetails{
|
||||
int64 id = 1; // ID
|
||||
int64 product_id = 2 [json_name="product_id"]; // 商品规格ID
|
||||
string spec_no = 3 [json_name="spec_no"]; // 商品规格编号
|
||||
string spec = 4; // 商品规格名称
|
||||
int64 type = 5; // 商品类型
|
||||
string title = 6; //商品名称
|
||||
string cover_image = 7 [json_name="cover_image"]; //商品封面图片
|
||||
int64 sales_price = 8 [json_name="sales_price"]; //商品销售价格
|
||||
string product_args = 9 [json_name="product_args"]; // 商品参数
|
||||
int64 number = 10; // 数量
|
||||
int64 unit_price = 11 [json_name="unit_price"]; // 单价
|
||||
int64 spec_id = 12 [json_name="spec_id"]; // 商品规格id
|
||||
string product_identity = 13 [json_name="product_identity"]; // 产品唯一标识
|
||||
int64 gas_types = 14 [json_name="gas_types"];// 商品类型:1其它商品 2按瓶计费,3 按kg计费
|
||||
int64 total_price = 15 [json_name="total_price"];// 总价
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
package order;
|
||||
option go_package = "./order";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/order/pb;order";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// Order(订单)微服务-购物车
|
||||
service Cart {
|
||||
@@ -9,13 +9,13 @@ service Cart {
|
||||
rpc Fetch(CartGetRequest) returns (CartGetReply) {};
|
||||
|
||||
// 将商品增加至购物车
|
||||
rpc Create(CartAddRequest) returns (StatusReply) {};
|
||||
rpc Create(CartAddRequest) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
// 修改购物车中的商品数量
|
||||
rpc Modify(CartSetRequest) returns (StatusReply) {};
|
||||
rpc Modify(CartSetRequest) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
// 删除购物车中的商品
|
||||
rpc Delete(CartDelRequest) returns (StatusReply) {};
|
||||
rpc Delete(CartDelRequest) returns (blocks.OrderStatusReply) {};
|
||||
}
|
||||
|
||||
message CartGetRequest {
|
||||
@@ -40,7 +40,7 @@ message CartItem{
|
||||
int32 number = 8; // 数量
|
||||
int64 unit_price = 9 [json_name="unit_price"]; // 实际单价
|
||||
int64 total_price = 10 [json_name="total_price"]; // 总价
|
||||
string identity = 11; // 购物车商品信息唯一标识
|
||||
string identity = 11; // 购物车商品信息唯一标识
|
||||
}
|
||||
|
||||
message CartAddRequest {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
syntax = "proto3";
|
||||
package order;
|
||||
option go_package = "./order";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/order/pb;order";
|
||||
|
||||
// Order(订单)微服务-优惠卷
|
||||
service Coupon {
|
||||
@@ -27,4 +26,4 @@ message CouponItem{
|
||||
string started =6; // 开始时间
|
||||
string expired =7; // 结束时间
|
||||
string status =8; // 状态
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
syntax = "proto3";
|
||||
package order;
|
||||
option go_package = "./order";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/order/pb;order";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// Order(订单)微服务-订单模块
|
||||
// 订单管理类模块
|
||||
service Mgt {
|
||||
|
||||
|
||||
// 创建订单
|
||||
rpc OrderCreate(CreateOrderRequest) returns (StatusReply) {};
|
||||
rpc OrderCreate(CreateOrderRequest) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
// 修改订单
|
||||
rpc OrderModify(OrderSummaryItem) returns (StatusReply) {};
|
||||
rpc OrderModify(blocks.OrderSummaryItem) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
// 获取一个订单的详情数据
|
||||
rpc OrderGet(IdentRequest) returns (OrderGetReply) {};
|
||||
rpc OrderGet(blocks.OrderIdentRequest) returns (OrderGetReply) {};
|
||||
|
||||
// 根据不同的类型获取店铺的订单列表
|
||||
rpc OrderListByStore(OrderListByStoreRequest) returns (OrderListByStoreReply) {};
|
||||
|
||||
// 取消订单
|
||||
rpc OrderCancel(IdentRequest) returns (StatusReply) {};
|
||||
rpc OrderCancel(blocks.OrderIdentRequest) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
// 退货
|
||||
rpc OrderReturnable(IdentRequest) returns (StatusReply) {};
|
||||
rpc OrderReturnable(blocks.OrderIdentRequest) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
// 订单审批
|
||||
rpc OrderApprove(IdentRequest) returns (StatusReply) {};
|
||||
rpc OrderApprove(blocks.OrderIdentRequest) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ message SpecList {
|
||||
|
||||
|
||||
message OrderGetReply {
|
||||
OrderSummaryItem summary = 1; // 订单概要详情
|
||||
blocks.OrderSummaryItem summary = 1; // 订单概要详情
|
||||
}
|
||||
|
||||
|
||||
@@ -64,5 +64,5 @@ message OrderListByStoreRequest {
|
||||
|
||||
message OrderListByStoreReply {
|
||||
int32 count = 1;
|
||||
repeated OrderSummaryItem data = 2; // 订单列表
|
||||
repeated blocks.OrderSummaryItem data = 2; // 订单列表
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
syntax = "proto3";
|
||||
package order;
|
||||
option go_package = "./order";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/ec/order/pb;order";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// Order(订单)微服务-订单模块
|
||||
// C端模块
|
||||
service Summary {
|
||||
|
||||
|
||||
// 快速创建一个店铺订单
|
||||
rpc QuickCreateByProduct(QuickCreateByProductRequest) returns (StatusReply) {};
|
||||
rpc QuickCreateByProduct(QuickCreateByProductRequest) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
// 将购物车的数据提交生成订单
|
||||
rpc Submit(SubmitRequest) returns (StatusReply) {};
|
||||
rpc Submit(SubmitRequest) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
// 检测是否有未确认及付款的订单
|
||||
rpc Check(Empty) returns (StatusReply) {};
|
||||
rpc Check(blocks.Empty) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
// 获取一个订单的详情数据
|
||||
rpc Get(IdentRequest) returns (SummaryGetReply) {};
|
||||
rpc Get(blocks.OrderIdentRequest) returns (SummaryGetReply) {};
|
||||
|
||||
// 根据不同的类型获取我的订单列表
|
||||
rpc List(SummaryListRequest) returns (SummaryListReply) {};
|
||||
@@ -27,16 +27,16 @@ service Summary {
|
||||
|
||||
|
||||
// 取消订单
|
||||
rpc Cancel(CancelRequest) returns (StatusReply) {};
|
||||
|
||||
rpc Cancel(CancelRequest) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
// 模拟支付
|
||||
rpc SimulatePay(SimulatePayRequest) returns (StatusReply) {};
|
||||
rpc SimulatePay(SimulatePayRequest) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
// 模拟发货
|
||||
rpc SimulateShipments(SimulateShipmentsRequest) returns (StatusReply) {};
|
||||
rpc SimulateShipments(SimulateShipmentsRequest) returns (blocks.OrderStatusReply) {};
|
||||
|
||||
// 模拟收货
|
||||
rpc SimulateReceiving(IdentRequest) returns (StatusReply) {};
|
||||
rpc SimulateReceiving(blocks.OrderIdentRequest) returns (blocks.OrderStatusReply) {};
|
||||
}
|
||||
message SimulateShipmentsRequest{
|
||||
string identity = 1; // 订单唯一标识
|
||||
@@ -72,7 +72,7 @@ message SubmitRequest {
|
||||
string store_identity =3 [json_name="store_identity"]; // 店铺唯一标识
|
||||
string address_identity = 4 [json_name="address_identity"]; // 地址库唯一标识
|
||||
string delivery_time=5 [json_name="delivery_time"]; // 预约配送时间
|
||||
OrderAddress address = 6;// 地址详情
|
||||
OrderAddress address = 6;// 地址详情
|
||||
}
|
||||
|
||||
message OrderAddress {
|
||||
@@ -88,7 +88,7 @@ message OrderAddress {
|
||||
}
|
||||
|
||||
message SummaryGetReply {
|
||||
OrderSummaryItem summary = 1; // 订单概要详情
|
||||
blocks.OrderSummaryItem summary = 1; // 订单概要详情
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ message SummaryListRequest {
|
||||
|
||||
message SummaryListReply {
|
||||
int32 count = 1;
|
||||
repeated OrderSummaryItem data = 2; // 订单列表
|
||||
repeated blocks.OrderSummaryItem data = 2; // 订单列表
|
||||
}
|
||||
|
||||
message ConfirmRequest {
|
||||
|
||||
Reference in New Issue
Block a user