Files
lone-services/rpc/order/order.proto
T
2026-09-21 15:03:52 +08:00

368 lines
7.5 KiB
Protocol Buffer

syntax = "proto3";
import "google/api/annotations.proto";
package order;
option go_package = "lone-services/rpc/order";
message OrderItemsRequest {
int32 page = 1;
int32 size = 2;
int64 product_id =3;
string order_sn = 4;
string mobile = 5;
int64 store_id = 6;
int64 sale_id = 7;
string time = 8;
int32 status = 9;
}
message Response {
int32 code = 1;
string msg = 2;
string data = 3;
}
message ExcelExportResponse {
bytes data = 1; // excel二进制
string name = 2;
string msg = 3;
}
message CreateOrderRequest {
int64 address_id = 1;
string note = 2;
int32 type = 3;
}
message CreateOrderOneRequest {
int64 address_id = 1;
string note = 2;
int64 product_id = 3;
int32 num = 4;
int32 type = 5;
}
message EditAddressRequest {
string district = 1;
string address = 2;
string name = 3;
string mobile = 4;
string district_ids = 5;
bool default = 6;
int64 id = 7;
int32 type = 8;
}
message EmptyRequest {
}
message EditCartRequest {
string info = 1;
int32 type = 2;
}
message CartRequest {
int32 type = 1;
}
message IdRequest {
int64 id = 1;
}
message ApiSupplyInfoRequest {
string order_sn = 1;
}
message IdAndTypeRequest {
int64 id = 1;
int32 type = 2;
}
message TypeRequest {
int32 type = 1;
}
message AddressItemsRequest {
int32 page = 1;
int32 size = 2;
int64 district_id =3;
string name = 4;
string mobile = 5;
int64 store_id = 6;
int64 sale_id = 7;
repeated string time = 8;
}
message AddressByStoreItemsRequest {
int64 store_id = 1;
}
message OrderAuditingItemsRequest {
int32 page = 1;
int32 size = 2;
int32 status = 3;
repeated string time = 8;
}
message OrderAuditingRequest {
int64 id = 1;
int32 status = 2;
string reason = 3;
}
message AdminCreateOrderRequest {
int64 address_id = 1;
string note = 2;
string info = 3;
int32 type =4;
}
message UpdateOrderDeliverStatusRequest {
string sign_time = 1;
int32 deliver_status = 2;
string id = 3;
}
message UpdateOrderPayStatusRequest {
string order_sn = 1;
int32 status = 2;
double pay_price = 3;
string remit_no = 4;
int32 pay_type =5;
}
message UpdateOrderPayStatusResponse {
int64 id = 1;
}
message UpdateOrderDeliverStatusResponse {
int32 num = 1;
}
message UpdateAddressSaleInfoResponse {
int32 num = 1;
}
message UpdateAddressSaleInfoRequest {
int64 id = 1;
int64 sale_id = 2;
int64 group_id =3;
}
message GetOrderInfoRequest {
int64 user_id = 1;
string order_sn = 2;
int32 type = 3;
}
message OrderInfoResponse {
int64 id =1;
string order_sn = 2;
int64 store_id = 3;
string store_name = 4;
string sale_name = 5;
string sale_mobile = 6;
int64 user_id = 7;
string user_name = 8;
int64 sale_id = 9;
string mobile = 10;
string address = 11;
string addressee =12;
string district_ids = 13;
double total_price = 14;
double pay_price = 15;
int32 pay_type = 16;
int32 deliver_status = 17;
int32 status = 18;
int32 is_supply = 19;
string note = 20;
string product_ids = 21;
string out_trade_no = 22;
int32 type = 23;
int32 verify_status = 24;
int32 create_type = 25;
int32 refund_status = 26;
repeated ProductItemsResponse product_items = 27;
}
message ProductItemsResponse {
int64 id = 1;
string order_sn = 2;
int64 product_id = 3;
string product_name = 4;
double price = 5;
int32 number = 6;
}
message ApiSupplyRequest {
string order_sn = 1;
string info = 2;
string reason = 3;
repeated string images = 4;
}
message StatusRequest {
int64 id = 1;
int32 status = 2;
string reason = 3;
}
message SupplyItemsRequest {
int32 page = 1;
int32 size = 2;
string order_sn = 3;
repeated string time = 4;
int32 status = 5;
}
service order {
rpc Items(OrderItemsRequest) returns(Response){
option (google.api.http) = {
get: "/admin/v3/order/items"
body: "*"
};
};
rpc AddressItem(AddressItemsRequest) returns(Response){
option (google.api.http) = {
get: "/admin/v3/address/items"
body: "*"
};
};
rpc AddressByStore(AddressByStoreItemsRequest) returns(Response){
option (google.api.http) = {
get: "/admin/v3/address/store/items"
body: "*"
};
};
rpc OrderAuditingItems(OrderAuditingItemsRequest) returns(Response){
option (google.api.http) = {
get: "/admin/v3/order/auditing/items"
body: "*"
};
};
rpc OrderAuditing(OrderAuditingRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/order/auditing"
body: "*"
};
};
rpc OrderCreate(AdminCreateOrderRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/order/create"
body: "*"
};
};
rpc OrderDown(OrderItemsRequest) returns(ExcelExportResponse){
option (google.api.http) = {
get: "/admin/v3/order/down"
body: "*"
};
};
rpc OrderInfo(IdRequest) returns(Response){
option (google.api.http) = {
get: "/admin/v3/order/info"
body: "*"
};
};
rpc SupplyItems(SupplyItemsRequest) returns(Response){
option (google.api.http) = {
get: "/admin/v3/supply/items"
body: "*"
};
};
rpc SupplyStatus(StatusRequest) returns(Response){
option (google.api.http) = {
get: "/admin/v3/supply/status"
body: "*"
};
};
rpc UpdateAddressSaleInfo(UpdateAddressSaleInfoRequest) returns(UpdateAddressSaleInfoResponse);
rpc UpdateOrderDeliverStatus(UpdateOrderDeliverStatusRequest) returns(UpdateOrderDeliverStatusResponse);
//type 1为销售 2为门店 3为个人
rpc GetOrderInfo(GetOrderInfoRequest) returns(OrderInfoResponse);
//status 1 为已支付 4 支付失败,其它的返回错误
rpc UpdateOrderPayStatus(UpdateOrderPayStatusRequest) returns(UpdateOrderPayStatusResponse);
/*****************API**********************/
rpc ApiSupply(ApiSupplyRequest) returns(Response){
option (google.api.http) = {
get: "/api/v3/supply/add"
body: "*"
};
};
rpc ApiSupplyInfo(ApiSupplyInfoRequest) returns(Response){
option (google.api.http) = {
get: "/api/v3/supply/info"
body: "*"
};
};
rpc WebCreate(CreateOrderRequest) returns(Response){
option (google.api.http) = {
post: "/api/v3/order/create"
body: "*"
};
};
rpc WebCreateOne(CreateOrderOneRequest) returns(Response){
option (google.api.http) = {
post: "/api/v3/order/create/one"
body: "*"
};
};
rpc WebAddressCreate(EditAddressRequest) returns(Response){
option (google.api.http) = {
post: "/api/v3/address/create"
body: "*"
};
};
rpc WebAddressEdit(EditAddressRequest) returns(Response){
option (google.api.http) = {
post: "/api/v3/address/edit"
body: "*"
};
};
rpc WebAddressDel(IdAndTypeRequest) returns(Response){
option (google.api.http) = {
post: "/api/v3/address/del"
body: "*"
};
};
rpc WebAddressDef(IdAndTypeRequest) returns(Response){
option (google.api.http) = {
post: "/api/v3/address/def"
body: "*"
};
};
rpc WebAddressInfo(IdAndTypeRequest) returns(Response){
option (google.api.http) = {
get: "/api/v3/address/info"
body: "*"
};
};
rpc WebAddressItems(TypeRequest) returns(Response){
option (google.api.http) = {
get: "/api/v3/address/items"
body: "*"
};
};
rpc WebCart(CartRequest) returns(Response){
option (google.api.http) = {
get: "/api/v3/cart"
body: "*"
};
};
rpc WebCartEdit(EditCartRequest) returns(Response){
option (google.api.http) = {
post: "/api/v3/cart/edit"
body: "*"
};
};
}