syntax = "proto3"; package tradeservice.aftersalesv1; option go_package = "./trade/aftersalesv1;aftersalesv1"; // 上游售后服务 service Reseller { // 上游售后列表 rpc CreatePre(CreatePreReq) returns (CreatePreResp) {} rpc Create(ResellerAfterInfo) returns (CreateResp) {} rpc Search(ResellerAfterSearchReq) returns (ResellerAfterSearchResp) {} rpc UpdateAudit(UpdateAuditReq) returns (UpdateAuditResp) {} rpc Get(GetReq) returns(ResellerAfterInfo){} rpc BatchPre(BatchPreReq) returns(BatchPreResp){} rpc BatchSubmit(BatchSubmitReq) returns(BatchSubmitResp){} } message BatchPreReq{ // 售后所属分销商 int32 reseller_id = 1; // 平台ID int32 platform_id = 2; // 售后发起人 int32 initiator = 3; // 售后方式:1退款;2扣款 int32 after_type = 4; // 费用承担方式:1商务承担;2上游承担;3公司 int32 responsible_type = 5; // 售后原因 string remark = 6; //售后订单信息,解析完excel后的数据 map items = 7; } message BatchPreItem{ int32 order_type = 1; string order_number = 2; double order_amount = 3; double order_price = 4; int32 sign_company = 5; int32 order_quantity = 6; int32 reseller_id = 7; string reseller_name = 8; int32 our_product_id = 9; string our_product_title = 10; string account = 11; double after_amount = 12; } message BatchFailItem{ int32 index = 1; string order_number = 2; string order_amount = 3; string msg = 4; } message BatchPreResp{ map pass = 1; map fail = 2; int32 sign_company = 3; int32 pass_count = 4; int32 fail_count = 5; double pass_amount = 6; string reseller_name = 7; } enum OrderType { UNKNOWN = 0; NORMAL = 1; BATCH = 2; } message CreatePreReq { // 售后类型 int32 order_type = 1; // 售后单号 string order_number = 2; } message CreatePreResp{ int32 order_type = 1; string order_number = 2; double order_amount = 3; double order_price = 4; int32 sign_company = 5; int32 order_quantity = 6; int32 reseller_id = 7; string reseller_name = 8; int32 our_product_id = 9; string our_product_title = 10; repeated string account = 11; map platforms = 12; } message ResellerAfterInfo { // 下游售后流水号 int32 id = 1; // 订单类型:1批量充值;2普通充值 int32 order_type = 2; // 订单号码 string order_number = 3; // 订单金额(快照) double order_amount = 4; // 订单单价(快照) double order_price = 5; // 签约公司(快照) int32 sign_company = 6; // 订单数量(快照) int32 order_quantity = 7; // 售后所属分销商 int32 reseller_id = 8; // 分销商名称(快照) string reseller_name = 9; // 售后发起人 int32 initiator = 10; // 我们的商品信息 int32 our_product_id = 11; // 我们的商品名称(快照) string our_product_title = 12; // 售后方式:1退款;2扣款 int32 after_type = 13; // 售后金额 double after_amount = 14; // 费用承担方式:1商务承担;2上游承担; 3公司 int32 responsible_type = 15; // 费用承担人ID int32 responsible_id = 16; // 费用承担人(快照) string responsible_person = 17; // 售后发起时间 int32 create_time = 18; // 售后原因 string remark = 19; // 审核时间 int32 audit_time = 20; // 审核状态:0审核中;1审核通过;2审核被拒绝;3审核发起异常 int32 audit_status = 21; // 审批备注 string audit_remark = 22; // 钉钉审批流水号 string dingtalk_sn = 23; // 钉钉审批链接 string dingtalk_link = 24; string dingtalk_instance_id = 25; //审批发起人姓名 string initiator_name = 26; //售后充值号码 string account = 27; } message CreateResp { int32 id = 1; } message ResellerAfterSearchReq { // 开始时间(时间戳) int64 start_time = 1; // 结束时间(时间戳) int64 end_time = 2; // 审核状态 int32 audit_status = 3; // 分销商ID int32 reseller_id = 4; // 发起人ID int32 initiator = 5; // 我们的商品ID int32 our_product_id = 6; // 售后方式:1退款;2扣款 int32 after_type = 7; // 费用承担方式:1商务承担;2上游承担 int32 responsible_type = 8; // 售后单号 int32 id = 9; // 原订单号 string order_number = 10; // 页码 int32 page = 11; // 每页数量 int32 limit = 12; int32 user_id = 13; // 角色:1分销商;2助理 int32 role = 14; string dingtalk_instance_id = 15; } message ResellerAfterSearchResp { // 售后列表 repeated ResellerAfterInfo list = 1; int32 total = 2; } enum AuditStatus{ None = 0; Pending = 1; Pass = 2; Reject = 3; Exception = 4; } message UpdateAuditReq { string id = 1; // 审核时间(时间戳) int32 audit_time = 2; // 审核状态:0审核中;1审核通过;2审核被拒绝;3审核发起异常 AuditStatus audit_status = 3; // 审批备注 string audit_remark = 4; // 钉钉审批流水号 string dingtalk_sn = 5; // 钉钉审批链接 string dingtalk_link = 6; string dingtalk_instance_id = 7; string dingtalk_corp_id = 8; } message UpdateAuditResp { int32 id = 1; int32 effect = 2;// 影响行数 } message GetReq{ int32 id = 1; } message BatchSubmitItem{ int32 order_type = 1; string order_number = 2; double order_amount = 3; double order_price = 4; int32 sign_company = 5; int32 order_quantity = 6; int32 reseller_id = 7; string reseller_name = 8; int32 our_product_id = 9; string our_product_title = 10; string account = 11; double after_amount = 12; } message BatchSubmitReq{ // 售后所属分销商 int32 reseller_id = 1; int32 sign_company = 2; // 平台ID int32 platform_id = 3; // 售后发起人 int32 initiator = 4; string Initiator_name = 5; // 售后方式:1退款;2扣款 int32 after_type = 6; // 费用承担方式:1商务承担;2上游承担;3公司 int32 responsible_type = 7; // 售后原因 string remark = 8; //售后订单信息,解析完excel后的数据 map pass = 9; int32 responsible_id = 10; string responsible_person = 11; string reseller_name = 12; } message BatchSubmitResp{ int32 id = 1; string dingtalk_link = 2; }