syntax = "proto3"; package tradeservice.aftersalesv1; option go_package = "./trade/aftersalesv1;aftersalesv1"; // 订单补单服务 service Supplement { // 创建补单 rpc CreateSupplement(CreateSupplementReq) returns (CreateSupplementResp) {} // 补单列表 rpc ListSupplement(ListSupplementReq) returns (ListSupplementResp) {} // 补单详情 rpc GetSupplement(GetSupplementReq) returns (GetSupplementResp) {} // 更新补单 rpc UpdateSupplement(UpdateSupplementReq) returns (UpdateSupplementResp) {} } // 创建补单请求 message CreateSupplementReq { // 原订单流水号 string original_serial_number = 1; // 原订单号 string original_order_number = 2; // 原下游商户id int32 original_reseller_id = 3; // 原接口商品id int32 original_platform_product_id = 4; // 补单下游商户id int32 reseller_id = 5; // 补单接口商品 int32 platform_product_id = 6; // 所属商务 int32 aftermarket = 7; // 充值账号 string terminal_account = 8; // 补单说明 string describe = 9; // 补单申请人id int32 handler_id = 10; // 费用承担者 1--上游供应商 2--商务 int32 cost_bearer = 11; // 补单授权商品 id int32 ours_product_id = 12; // 签约公司 int32 sign_company = 13; // 原单成交价格 double original_trade_price = 14; // 当前使用的接口备选项序号 int32 position = 15; } // 创建补单响应 message CreateSupplementResp { int32 id = 1; } // 补单列表请求 message ListSupplementReq { // 创建时间 repeated int32 create_time = 1; // 审核状态 1--待审核 2--审核成功 3--审核失败 int32 examine_status = 2; // 原下游商户id int32 original_reseller_id = 3; // 补单下游商户id int32 reseller_id = 4; // 原订单流水号 string original_serial_number = 5; // 补单订单流水号 string serial_number = 6; // 补单订单状态 1--待补单 2--补单中 3--补单成功 4--补单失败 int32 status = 7; // 申请人 int32 handler_id = 8; // 页码 int32 page = 9; // 条数 int32 limit = 10; } // 补单列表响应 message ListSupplementResp { int32 total = 1; repeated OrderSupplement list = 2; } // 补单详情请求 message GetSupplementReq { int32 id = 1; bool with_direct = 2; } // 补单详情响应 message GetSupplementResp { OrderSupplement info = 1; optional SupplementDirect direct = 2; optional SupplementDirect original_direct = 3; } // 更新补单请求 message UpdateSupplementReq { int32 id = 1; optional int32 examine_status = 2; optional int32 examine_time = 3; optional string process_instance_id = 4; optional string dingtalk_sn = 5; } // 更新补单响应 message UpdateSupplementResp { int32 cnt = 1; } // 补单信息 message OrderSupplement { // 补单id int32 id = 1; // 原订单流水号 string original_serial_number = 2; // 原订单号 string original_order_number = 3; // 原下游商户id int32 original_reseller_id = 4; // 补单订单流水号 string serial_number = 5; // 补单下游商户id int32 reseller_id = 6; // 补单接口商品 int32 platform_product_id = 7; // 所属商务 int32 aftermarket = 8; // 充值账号 string terminal_account = 9; // 审核状态 1--待审核 2--审核成功 3--审核失败 int32 examine_status = 10; // 补单说明 string describe = 11; // 补单申请人id int32 handler_id = 12; // 费用承担者 1--上游供应商 2--商务 3--公司 int32 cost_bearer = 13; // 原接口商品id int32 original_platform_product_id = 14; // 补单申请时间 int32 create_time = 15; // 补单审核时间 int32 examine_time = 16; // 钉钉审批号 string dingtalk_sn = 17; // 钉钉审批id string process_instance_id = 18; // 补单订单状态 1--待补单 2--补单中 3--补单成功 4--补单失败 int32 status = 19; // 补单完成时间 int32 complete_time = 20; // 补单授权商品id int32 ours_product_id = 21; // 签约公司 int32 sign_company = 22; // 原单成交价格 double original_trade_price = 23; // 当前使用的接口备选项序号 int32 position = 24; // 补单失败原因 string fail_message = 25; } message SupplementDirect { string id = 1; string order_order_number = 2; string terminal_account = 3; // 商品ID int32 ours_product_id = 4; // 状态 int32 status = 5; // 成交价格 double trade_price = 6; // 本次使用的平台商品id int32 platform_product_id = 7; // 平台产品价格缓存信息 double platform_price = 8; int32 create_time = 9; int32 execute_time = 10; // 序号 int32 identifier = 11; // 修改版本 int32 version = 12; // 充值类型:0订单模式1叠加模式2批量模式 int32 type = 13; // 当前使用的接口备选项序号 int32 position = 14; int32 reseller_id = 17; int32 aftermarket = 18; optional double purchase_price = 19; optional int32 invoice_type = 20; optional int32 rebate_type = 21; optional double rebate_ratio = 22; optional double monthly_rebate = 23; optional double quarter_rebate = 24; optional double year_rebate = 25; optional double other_rebate = 26; optional double sum_rebate = 27; optional double real_purchase_price = 28; }