efcb717acf
CI / changes (push) Successful in 1m28s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / bff (push) Successful in 24s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 23s
CI / express (push) Failing after 7s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 17s
CI / product (push) Successful in 0s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 0s
CI / wecom (push) Successful in 0s
299 lines
6.1 KiB
Protocol Buffer
299 lines
6.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package express;
|
|
option go_package="./express";
|
|
import "google/api/annotations.proto";
|
|
|
|
|
|
message Response {
|
|
int32 code = 1;
|
|
string msg = 2;
|
|
string data = 3;
|
|
}
|
|
|
|
message SfResponse {
|
|
string return_code = 1;
|
|
string return_msg = 2;
|
|
}
|
|
|
|
message IdResponse {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message EmtpyRequest {
|
|
}
|
|
|
|
message JdRequest {
|
|
string app_code = 1;
|
|
string timestamp = 2;
|
|
string sign =3;
|
|
string path=4;
|
|
}
|
|
|
|
message CreateRequest {
|
|
int64 id = 1;
|
|
string name = 2;
|
|
int32 transit_id = 3;
|
|
string app_code = 4;
|
|
string app_secret_key = 5;
|
|
string app_url = 6;
|
|
string card_number = 7;
|
|
string province = 8;
|
|
string city = 9;
|
|
string county = 10;
|
|
string address = 11;
|
|
string company_name = 12;
|
|
string contact = 13;
|
|
string mobile = 14;
|
|
string pdf_code = 15;
|
|
string other = 16;
|
|
}
|
|
|
|
message IdRequest {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message StatusRequest {
|
|
int64 id = 1;
|
|
int32 status = 2;
|
|
string reason = 3;
|
|
}
|
|
|
|
message HistoryRequest {
|
|
int32 page = 1;
|
|
int32 size = 2;
|
|
}
|
|
|
|
message DeliveryOrderCreateRequest {
|
|
string obj_id = 1;
|
|
string mobile = 2;
|
|
string address = 3;
|
|
string addressee = 4;
|
|
string province = 5;
|
|
string city = 6;
|
|
string county = 7;
|
|
repeated DeliverOrderProductInfo product_info = 8;
|
|
int64 group_id = 9;
|
|
string obj_sn = 10;
|
|
int32 type = 11;
|
|
int32 status = 12;
|
|
}
|
|
|
|
message DeliverOrderProductInfo {
|
|
int32 number = 1;
|
|
string product_name = 2;
|
|
int32 type = 3;
|
|
double price = 4;
|
|
int64 product_id = 5;
|
|
}
|
|
|
|
message DeliveringRequest {
|
|
int64 transit_id = 1;
|
|
int64 id = 2;
|
|
}
|
|
|
|
message ExpressPrintCompanyRequest {
|
|
string code = 1;
|
|
}
|
|
message IdApiRequest {
|
|
int64 id = 1;
|
|
int32 type=2;
|
|
}
|
|
|
|
message PrintBarCodeRequest {
|
|
int32 number = 1;
|
|
int64 product_id = 2;
|
|
}
|
|
|
|
message PrintBarCodePrintRequest {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message PrintExpressRequest {
|
|
int32 status = 1;
|
|
string order_sn = 2;
|
|
string time = 3;
|
|
}
|
|
|
|
message PrintExpressPrintRequest {
|
|
int64 id = 1;
|
|
int64 transit_id = 2;
|
|
}
|
|
|
|
message PrintExpressTransitRequest {
|
|
string company = 1;
|
|
}
|
|
|
|
message PrintBindRequest {
|
|
string transit_sn = 1;
|
|
string transit_name = 2;
|
|
}
|
|
|
|
message DeliveryInfoResponse {
|
|
string transit_name = 1;
|
|
string transit_sn = 2;
|
|
string estimated_time = 3;
|
|
string transit_query = 4;
|
|
int32 status = 5;
|
|
int64 id = 6;
|
|
}
|
|
|
|
|
|
service Express {
|
|
rpc Items(EmtpyRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/express/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc Create(CreateRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/express/create"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc Edit(CreateRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/express/edit"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc Info(IdRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/express/info"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc Names(EmtpyRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/express/names"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc Status(StatusRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/express/status"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc History(HistoryRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/delivery/history"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
//发货
|
|
rpc ExpressDelivering(DeliveringRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/express/delivering"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc ExpressAdminCancel(IdRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/express/cancel"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ExpressAdminQuery(IdRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/express/query"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc ExpressAdminEstimated(IdRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/express/estimated"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc PrintBarCode(PrintBarCodeRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/print/bar/code"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc PrintBarCodePrint(PrintBarCodePrintRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/print/bar/code/print"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc PrintExpress(PrintExpressRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/print/express"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc PrintExpressTransit(PrintExpressTransitRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/print/express/transit"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc PrintExpressPrint(PrintExpressPrintRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/print/express/print"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc PrintProduct(EmtpyRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/print/express/product"
|
|
body: "*"
|
|
};
|
|
};
|
|
//不需要登录
|
|
rpc PrintBind(PrintBindRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/transit/bind"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
/*****************API***********************/
|
|
rpc ExpressSfBack(EmtpyRequest) returns(SfResponse){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/express/sf"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ExpressJdBack(JdRequest) returns(SfResponse){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/express/jd"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc ExpressApiQuery(IdApiRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/api/v3/express/query"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc ExpressApiEstimated(IdApiRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/api/v3/express/estimated"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc ExpressApiCancel(IdApiRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/api/v3/express/cancel"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
//添加生成订单的发货信息
|
|
rpc DeliveryOrderCreate(DeliveryOrderCreateRequest) returns(IdResponse);
|
|
rpc GetDeliveryByOrderId(IdRequest) returns(DeliveryInfoResponse);
|
|
rpc GetDeliveryBySupplyId(IdRequest) returns(DeliveryInfoResponse);
|
|
}
|