syntax = "proto3"; package wecom; option go_package = "lone-services/rpc/wecom"; import "google/api/annotations.proto"; service Wecom { rpc ItemsUsers(ItemsUserReq) returns (Response) { option (google.api.http) = { get: "/admin/v3/wecom/user" body: "*" }; } rpc CreateUser(CreateUserReq) returns (Response) { option (google.api.http) = { post: "/admin/v3/wecom/user" body: "*" }; } rpc UpdateUser(UpdateUserReq) returns (Response) { option (google.api.http) = { put: "/admin/v3/wecom/user" body: "*" }; } rpc StatusUser(StatusUserReq) returns (Response) { option (google.api.http) = { put: "/admin/v3/wecom/user/status" body: "*" }; } rpc DeleteUser(DeleteUserReq) returns (Response) { option (google.api.http) = { put: "/admin/v3/wecom/user/delete" body: "*" }; } rpc ItemsAgents(EmptyReq) returns (Response) { option (google.api.http) = { get: "/admin/v3/wecom/agent" body: "*" }; } rpc Types(EmptyReq) returns (Response) { option (google.api.http) = { get: "/admin/v3/wecom/types" body: "*" }; } rpc CreateTags(CreateTagsReq) returns (Response) { option (google.api.http) = { post: "/admin/v3/wecom/tags" body: "*" }; } rpc ItemsTags(ItemsTagsReq) returns (Response) { option (google.api.http) = { get: "/admin/v3/wecom/tags" body: "*" }; } rpc CreateReviewChange(CreateReviewChangeReq) returns (Response); rpc SendMessage(SendMessageReq) returns (Response); } message EmptyReq {} message CreateTagsReq{ string name = 1; string remarks = 2; } message ItemsTagsReq{ string name = 1; uint32 page = 2; uint32 page_size = 3; } message ItemsUserReq { uint32 page = 1; uint32 page_size = 2; string name = 3; uint32 type = 4; uint32 status = 5; } message CreateUserReq { int64 user_id = 1; uint32 type = 2; string name = 3; string mobile = 4; string avatar = 5; uint32 status = 6; repeated int64 agent_ids = 7; } message UpdateUserReq { int64 id = 1; int64 user_id = 2; uint32 type = 3; string name = 4; string mobile = 5; string avatar = 6; uint32 status = 7; repeated int64 agent_ids = 8; } message StatusUserReq { int64 id = 1; uint32 status = 2; // 1: 启用,2: 禁用 } message DeleteUserReq { int64 id = 1; } // type: 1产品 2门店 3地址;before_data/after_data 为 JSON 字符串 message CreateReviewChangeReq { uint32 type = 1; int64 biz_id = 2; string task_id = 3; string before_data = 4; string after_data = 5; int64 admin_id = 6; string admin_name = 7; } // biz_type: 1产品 2门店 3地址 4销售;type: 消息场景;action: 0未用 1通过 2拒绝 message SendMessageReq { int64 biz_id = 1; uint32 biz_type = 2; uint32 type = 3; uint32 action = 4; string reason = 5; string key = 6; } message Response { int32 code = 1; string msg = 2; string data = 3; }