203 lines
4.8 KiB
Protocol Buffer
203 lines
4.8 KiB
Protocol Buffer
syntax = "proto3";
|
||
|
||
package api.inner;
|
||
|
||
import "card/cardv1/global.proto";
|
||
|
||
option go_package = "./card/cardv1;cardv1";
|
||
|
||
service Reseller {
|
||
// 被授权系统商品列表
|
||
rpc BeAuthorizedListResellerGoods (BeAuthorizedListResellerGoodsRequest) returns (BeAuthorizedListResellerGoodsReply);
|
||
|
||
// 授权商品列表
|
||
rpc BeAuthorizedListResellerGoodsSelect (BeAuthorizedListResellerGoodsSelectRequest) returns (BeAuthorizedListResellerGoodsSelectReply);
|
||
|
||
// 授权商品品牌列表
|
||
rpc ListResellerGoodsBrand (ListResellerGoodsBrandRequest) returns (ListResellerGoodsBrandReply);
|
||
|
||
// 获取授权品牌商品
|
||
rpc GetAuthorizedGoodsByBrand (GetAuthorizedGoodsByBrandRequest) returns (GetAuthorizedGoodsByBrandReply);
|
||
|
||
// 获取授权商品可用库存
|
||
rpc GetAuthorizedGoodsStock (GetAuthorizedGoodsStockRequest) returns (GetAuthorizedGoodsStockReply);
|
||
|
||
// 授权商品品牌列表
|
||
rpc ListResellerGoodsBrandV2 (ListResellerGoodsBrandRequest) returns (ListResellerGoodsBrandReply);
|
||
|
||
// 获取授权商品的成本价格
|
||
rpc GetAuthorizedGoodsCost (GetAuthorizedGoodsPriceRequest) returns (GetAuthorizedGoodsPriceReply);
|
||
}
|
||
|
||
message GetAuthorizedGoodsPriceRequest {
|
||
// 商品code
|
||
string code = 1;
|
||
|
||
// 分销商ID
|
||
uint32 resellerId = 2;
|
||
}
|
||
|
||
message GetAuthorizedGoodsPriceReply {
|
||
// 成本
|
||
double cost = 1;
|
||
|
||
// 状态
|
||
StatusEnum status = 2;
|
||
enum StatusEnum {
|
||
// 默认
|
||
UNKNOWN = 0;
|
||
// 启用
|
||
ENABLE = 1;
|
||
// 未授权
|
||
UNAUTHORIZED = 2;
|
||
// 停用
|
||
DISABLE = 3;
|
||
}
|
||
}
|
||
|
||
message GetAuthorizedGoodsStockRequest {
|
||
// 授权商品ID
|
||
repeated uint32 resellerGoodsIds = 1;
|
||
// 分销商ID
|
||
uint32 resellerId = 2;
|
||
// 系统商品CODE列表
|
||
repeated string systemGoodsCodes = 3;
|
||
}
|
||
message GetAuthorizedGoodsStockReply {
|
||
message StockItem {
|
||
// 授权商品ID
|
||
uint32 resellerGoodsId = 1;
|
||
// 库存
|
||
int32 stock = 2;
|
||
// 系统商品CODE
|
||
string systemGoodsCode = 3;
|
||
}
|
||
repeated StockItem list = 1;
|
||
}
|
||
|
||
message GetAuthorizedGoodsByBrandRequest {
|
||
// 品牌ID
|
||
uint32 brandId = 1;
|
||
// 权益等级ID
|
||
uint32 rightsId = 2;
|
||
// 模糊查询, 支持系统商品、品牌商品、权益等级、品牌名称模糊搜索
|
||
string keyword = 3;
|
||
// 分销商ID
|
||
uint32 resellerId = 4;
|
||
// 授权商品ID列表
|
||
repeated uint32 resellerGoodsIds = 5;
|
||
// 授权商品状态
|
||
int32 status = 6;
|
||
// 是否需要软删除数据
|
||
bool showDeleted = 7;
|
||
// 是否需要数据去重
|
||
bool distinct = 8;
|
||
// 请求系统来源 2 商户中心
|
||
int32 from = 9;
|
||
}
|
||
message GetAuthorizedGoodsByBrandReply {
|
||
message GoodsItem {
|
||
// 系统商品名称
|
||
string systemGoodsName = 1;
|
||
// 商品授权价格
|
||
double price = 2;
|
||
// 面额
|
||
string faceValue = 3;
|
||
// 库存
|
||
int32 stock = 4;
|
||
// 商品类型
|
||
repeated string types = 5;
|
||
// 品牌商品名称
|
||
string brandGoodsName = 6;
|
||
// 品牌商品CODE
|
||
string brandGoodsCode = 7;
|
||
// 品牌商品ID
|
||
uint32 brandGoodsId = 8;
|
||
// 系统商品code
|
||
string systemGoodsCode = 9;
|
||
// 系统商品ID
|
||
uint32 systemGoodsId = 10;
|
||
// 授权商品ID
|
||
uint32 resellerGoodsId = 11;
|
||
// 品牌商品价格
|
||
double brandPrice = 12;
|
||
// 授权商品状态, true为可用
|
||
bool status = 13;
|
||
// 权益ID
|
||
uint32 brandRightsId = 14;
|
||
}
|
||
repeated GoodsItem list = 1;
|
||
}
|
||
|
||
message ListResellerGoodsBrandRequest {
|
||
// 模糊查询
|
||
string keyword = 1;
|
||
// 商品类目
|
||
uint32 categoryId = 2;
|
||
// 分销商ID
|
||
uint32 resellerId = 3;
|
||
}
|
||
message ListResellerGoodsBrandReply {
|
||
message BrandItem {
|
||
// 品牌ID
|
||
uint32 id = 1;
|
||
// 品牌名称
|
||
string name = 2;
|
||
// 品牌图片
|
||
string logo = 3;
|
||
// 权益等级
|
||
repeated BrandRightsBase rights = 4;
|
||
// 商品类目
|
||
uint32 categoryId = 5;
|
||
}
|
||
// 可购买品牌
|
||
repeated BrandItem purchaseBrandList = 1;
|
||
// 不可购买品牌
|
||
repeated BrandItem unPurchaseBrandList = 2;
|
||
}
|
||
|
||
// 被授权系统商品列表请求参数
|
||
message BeAuthorizedListResellerGoodsRequest {
|
||
// 分页参数, 必传
|
||
PageReq page = 1;
|
||
// 分销商ID
|
||
uint32 reseller_id = 2;
|
||
// 卡单模式
|
||
RestrictMode mode = 3;
|
||
// 品牌类型
|
||
BrandGoodsType type = 4;
|
||
// 状态
|
||
GlobalStatus status = 5;
|
||
// 模糊查询
|
||
string keyword = 6;
|
||
// 品牌ID
|
||
uint32 brandId = 7;
|
||
// 审批单号
|
||
string approvalNo = 8;
|
||
// 系统商品类目信息
|
||
uint32 categoryId = 9;
|
||
// 关闭分销商明细数据
|
||
bool closeResellerDetail = 10;
|
||
// 是否是虚拟仓商品 1是,2不是 0全部
|
||
int32 isVirtual = 11;
|
||
}
|
||
// 被授权系统商品列表返回参数
|
||
message BeAuthorizedListResellerGoodsReply {
|
||
// 分页参数
|
||
PageReply page = 1;
|
||
// 被授权系统商品列表明细
|
||
repeated ResellerGoodsItem list = 2;
|
||
}
|
||
|
||
message BeAuthorizedListResellerGoodsSelectRequest {
|
||
string keyword = 1;
|
||
PageReq page = 2;
|
||
uint32 resellerId = 3;
|
||
// 是否是虚拟仓商品 1是,2不是 0全部
|
||
int32 isVirtual = 4;
|
||
}
|
||
message BeAuthorizedListResellerGoodsSelectReply {
|
||
repeated SelectOption list = 1;
|
||
PageReply page = 2;
|
||
}
|