2026-08-09 10:43:45 +08:00
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
package order;
|
2026-08-09 15:10:19 +08:00
|
|
|
|
option go_package = "bsm/full/module/ec/order/pb;order";
|
2026-08-09 20:14:57 +08:00
|
|
|
|
import "module/ec/order/proto/const.proto";
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// Order(订单)微服务-订单模块
|
|
|
|
|
|
// 订单管理类模块
|
|
|
|
|
|
service Mgt {
|
2026-08-09 15:10:19 +08:00
|
|
|
|
|
2026-08-09 10:43:45 +08:00
|
|
|
|
// 创建订单
|
2026-08-10 10:03:46 +08:00
|
|
|
|
rpc OrderCreate(CreateOrderRequest) returns (ec_order_blocks.OrderStatusReply) {};
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// 修改订单
|
2026-08-10 10:03:46 +08:00
|
|
|
|
rpc OrderModify(ec_order_blocks.OrderSummaryItem) returns (ec_order_blocks.OrderStatusReply) {};
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// 获取一个订单的详情数据
|
2026-08-10 10:03:46 +08:00
|
|
|
|
rpc OrderGet(ec_order_blocks.OrderIdentRequest) returns (OrderGetReply) {};
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// 根据不同的类型获取店铺的订单列表
|
|
|
|
|
|
rpc OrderListByStore(OrderListByStoreRequest) returns (OrderListByStoreReply) {};
|
|
|
|
|
|
|
|
|
|
|
|
// 取消订单
|
2026-08-10 10:03:46 +08:00
|
|
|
|
rpc OrderCancel(ec_order_blocks.OrderIdentRequest) returns (ec_order_blocks.OrderStatusReply) {};
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// 退货
|
2026-08-10 10:03:46 +08:00
|
|
|
|
rpc OrderReturnable(ec_order_blocks.OrderIdentRequest) returns (ec_order_blocks.OrderStatusReply) {};
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// 订单审批
|
2026-08-10 10:03:46 +08:00
|
|
|
|
rpc OrderApprove(ec_order_blocks.OrderIdentRequest) returns (ec_order_blocks.OrderStatusReply) {};
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message CreateOrderRequest{
|
|
|
|
|
|
int32 partner_id =1 [json_name="partner_id"]; // 合伙人ID
|
|
|
|
|
|
string args = 2; // 相关参数
|
|
|
|
|
|
string address_identity = 3 [json_name="address_identity"]; // 地址库唯一标识
|
|
|
|
|
|
string delivery_time=4 [json_name="delivery_time"]; // 预约配送时间
|
|
|
|
|
|
repeated SpecList spec = 5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message SpecList {
|
|
|
|
|
|
int32 number = 1; // 数量
|
|
|
|
|
|
string product_identity = 2 [json_name="product_identity"]; // 商品唯一标识
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message OrderGetReply {
|
2026-08-10 10:03:46 +08:00
|
|
|
|
ec_order_blocks.OrderSummaryItem summary = 1; // 订单概要详情
|
2026-08-09 10:43:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message OrderListByStoreRequest {
|
|
|
|
|
|
int32 pay_type = 1 [json_name="pay_type"]; // 支付类型:0:待支付,1:线下支付,2:微信 3:支付宝,4:余额
|
|
|
|
|
|
repeated int32 order_status= 2 [json_name="order_status"]; // 订单状态 1:未支付 2:已支付 3:已发货 4:已收货 5:已完成 6:已收货退款 7:未发货退款 8:已退货 -1:已取消
|
|
|
|
|
|
int64 page_no=3 [json_name="page_no"]; // 页数
|
|
|
|
|
|
int64 page_size=4 [json_name="page_size"]; // 每页记录数
|
|
|
|
|
|
int64 partner_id = 5 [json_name="partner_id"];// 分销商ID
|
|
|
|
|
|
string agency = 6 ;// 代理
|
|
|
|
|
|
string store_identity = 7;// 店铺标识
|
|
|
|
|
|
int32 status = 8;// 订单状态
|
|
|
|
|
|
string keyword = 9;// 关键字
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message OrderListByStoreReply {
|
|
|
|
|
|
int32 count = 1;
|
2026-08-10 10:03:46 +08:00
|
|
|
|
repeated ec_order_blocks.OrderSummaryItem data = 2; // 订单列表
|
2026-08-09 10:43:45 +08:00
|
|
|
|
}
|