2023-05-31 03:38:17 +00:00
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
info (
|
|
|
|
title: // TODO: add title
|
|
|
|
desc: // TODO: add description
|
|
|
|
author: ""
|
|
|
|
email: ""
|
|
|
|
)
|
2023-06-21 08:39:55 +00:00
|
|
|
|
2023-06-01 07:32:28 +00:00
|
|
|
import "basic.api"
|
2023-06-21 08:39:55 +00:00
|
|
|
|
2023-06-05 03:27:01 +00:00
|
|
|
service product {
|
2023-07-13 11:05:13 +00:00
|
|
|
//获取分类产品列表
|
|
|
|
@handler GetTagProductListHandler
|
|
|
|
get /api/product/tag_product_list(GetTagProductListReq) returns (response);
|
2023-09-26 02:54:11 +00:00
|
|
|
//获取产品阶梯价格信息
|
|
|
|
@handler GetProductStepPriceHandler
|
|
|
|
get /api/product/get_product_step_price(GetProductStepPriceReq) returns (response);
|
2023-09-26 03:10:41 +00:00
|
|
|
//根据产品+配件搭配计算价格
|
2023-09-26 03:40:27 +00:00
|
|
|
@handler CalculateProductPriceHandler
|
|
|
|
post /api/product/calculate_product_price(CalculateProductPriceReq) returns (response);
|
2023-07-20 07:45:58 +00:00
|
|
|
//获取详情页推荐产品列表
|
2023-10-20 03:46:51 +00:00
|
|
|
@handler GetRecommendProductListHandler
|
2023-10-20 03:47:46 +00:00
|
|
|
get /api/product/recommend(GetRecommendProductListReq) returns (response);
|
2023-07-20 09:35:13 +00:00
|
|
|
//获取列表页推荐产品列表
|
2023-07-20 09:47:28 +00:00
|
|
|
@handler HomePageRecommendProductListHandler
|
2023-07-21 07:20:18 +00:00
|
|
|
get /api/product/home_page_recommend(HomePageRecommendProductListReq) returns (response);
|
2023-10-30 08:50:58 +00:00
|
|
|
//获取产品详情
|
2023-10-16 10:54:23 +00:00
|
|
|
@handler GetProductDetailHandler
|
|
|
|
get /api/product/get_product_detail(GetProductDetailReq) returns (response);
|
2023-06-07 09:27:17 +00:00
|
|
|
}
|
|
|
|
|
2023-07-11 09:08:19 +00:00
|
|
|
//获取详情页推荐产品列表
|
2023-10-20 03:46:51 +00:00
|
|
|
type GetRecommendProductListReq {
|
2023-10-20 02:59:36 +00:00
|
|
|
Num int64 `form:"num,optional"`
|
|
|
|
ProductId int64 `form:"product_id"`
|
2023-07-11 09:08:19 +00:00
|
|
|
}
|
|
|
|
type GetRecommandProductListRsp {
|
2023-10-19 03:51:49 +00:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
TitleCn string `json:"title_cn"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
CoverMetadata interface{} `json:"cover_metadata"`
|
|
|
|
CoverImg string `json:"cover_img"`
|
|
|
|
CoverImgMetadata interface{} `json:"cover_img_metadata"`
|
|
|
|
CoverDefault []CoverDefaultItem `json:"cover_default"`
|
|
|
|
Intro string `json:"intro"`
|
|
|
|
Recommend bool `json:"recommend"`
|
|
|
|
MinPrice int64 `json:"min_price"`
|
|
|
|
IsCustomization int64 `json:"is_customization"`
|
|
|
|
SizeCount int64 `json:"size_count"`
|
2023-10-19 03:59:10 +00:00
|
|
|
HaveOptionalFitting bool `json:"have_optional_fitting"`
|
2023-07-13 11:05:13 +00:00
|
|
|
}
|
|
|
|
//获取分类产品列表
|
|
|
|
type GetTagProductListReq {
|
2023-10-30 08:30:01 +00:00
|
|
|
BasicTagId int64 `form:"basic_tag_id,optional"` //传入则以该分类为最高层分类查询
|
2023-10-30 07:03:00 +00:00
|
|
|
MerchantType int64 `form:"merchant_type,optional"` //商户类型
|
|
|
|
TemplateTag string `form:"template_tag,optional"` //模板标签
|
|
|
|
WithProduct bool `form:"with_product,optional"` //是否携带分类下的产品
|
2023-07-13 11:05:13 +00:00
|
|
|
}
|
|
|
|
type GetTagProductListRsp {
|
2023-10-25 06:09:12 +00:00
|
|
|
TotalCategoryProduct int `json:"total_category_product"`
|
|
|
|
TagMap interface{} `json:"tag_map"`
|
2023-07-13 11:05:13 +00:00
|
|
|
}
|
|
|
|
type TagItem {
|
2023-07-24 10:02:30 +00:00
|
|
|
TypeName string `json:"type_name"`
|
|
|
|
TypeId int64 `json:"type_id"`
|
|
|
|
Icon string `json:"icon"`
|
|
|
|
Sort int64 `json:"sort"`
|
|
|
|
LevelPrefix string `json:"level_prefix"`
|
|
|
|
TagProductList []interface{} `json:"tag_product_list"` //分类下的产品
|
|
|
|
ChildTagList []*TagItem `json:"child_tag_list"`
|
2023-07-13 11:05:13 +00:00
|
|
|
}
|
|
|
|
type TagProduct {
|
2023-10-25 06:37:32 +00:00
|
|
|
Id int64 `json:"id"`
|
2023-09-05 10:29:44 +00:00
|
|
|
Sn string `json:"sn"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
CoverMetadata interface{} `json:"cover_metadata"`
|
|
|
|
SizeNum uint32 `json:"size_num"`
|
|
|
|
MinPrice int64 `json:"min_price"`
|
2023-08-08 04:56:53 +00:00
|
|
|
//彩膜列表
|
|
|
|
CoverDefault []CoverDefaultItem `json:"cover_default"`
|
|
|
|
HaveOptionalFitting bool `json:"have_optional_fitting"`
|
|
|
|
Recommended bool `json:"recommended"`
|
2023-09-07 10:28:19 +00:00
|
|
|
IsCustomization int64 `json:"is_customization"`
|
2023-08-08 04:56:53 +00:00
|
|
|
}
|
|
|
|
type CoverDefaultItem {
|
2023-09-06 07:06:50 +00:00
|
|
|
TemplateTag string `json:"template_tag"`
|
2023-09-05 08:35:02 +00:00
|
|
|
Cover string `json:"cover"`
|
|
|
|
CoverMetadata interface{} `json:"cover_metadata"`
|
2023-07-14 07:57:27 +00:00
|
|
|
}
|
2023-09-26 02:54:11 +00:00
|
|
|
//获取产品阶梯价格信息
|
|
|
|
type GetProductStepPriceReq {
|
|
|
|
ProductId int64 `form:"product_id"`
|
|
|
|
}
|
2023-09-26 03:10:41 +00:00
|
|
|
//根据产品+配件搭配计算价格
|
2023-09-26 03:40:27 +00:00
|
|
|
type CalculateProductPriceReq {
|
2023-09-26 03:10:41 +00:00
|
|
|
ProductId int64 `json:"product_id"`
|
|
|
|
SizeId int64 `json:"size_id"`
|
|
|
|
FittingId int64 `json:"fitting_id,optional"`
|
|
|
|
PurchaseQuantity int64 `json:"purchase_quantity"`
|
|
|
|
}
|
2023-09-26 03:40:27 +00:00
|
|
|
type CalculateProductPriceRsp {
|
2023-10-07 06:24:57 +00:00
|
|
|
ItemPrice string `json:"item_price"`
|
|
|
|
TotalPrice string `json:"total_price"`
|
|
|
|
StepRange interface{} `json:"step_range"`
|
2023-09-26 03:40:27 +00:00
|
|
|
}
|
2023-10-30 08:50:58 +00:00
|
|
|
|
2023-07-20 09:35:13 +00:00
|
|
|
//获取列表页推荐产品(返回是这个维度数组)
|
2023-07-20 09:47:28 +00:00
|
|
|
type HomePageRecommendProductListReq {
|
2023-10-24 04:28:44 +00:00
|
|
|
MerchantType int64 `form:"merchant_type"`
|
2023-07-20 09:35:13 +00:00
|
|
|
}
|
2023-07-20 09:47:28 +00:00
|
|
|
type HomePageRecommendProductListRsp {
|
2023-08-14 04:30:14 +00:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Cover string `json:"cover"`
|
2023-09-05 08:35:02 +00:00
|
|
|
CoverMetadata interface{} `json:"cover_metadata"`
|
2023-08-14 04:30:14 +00:00
|
|
|
SizeNum uint32 `json:"size_num"`
|
|
|
|
MinPrice int64 `json:"min_price"`
|
|
|
|
CoverDefault []CoverDefaultItem `json:"cover_default"`
|
|
|
|
HaveOptionalFitting bool `json:"have_optional_fitting"`
|
2023-09-07 10:28:19 +00:00
|
|
|
IsCustomization int64 `json:"is_customization"`
|
2023-10-16 10:54:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//获取产品详情(重构版)
|
2023-10-17 07:33:46 +00:00
|
|
|
type GetProductDetailReq {
|
2023-10-20 02:47:24 +00:00
|
|
|
ProductId int64 `form:"product_id"` //产品id
|
|
|
|
TemplateTag string `form:"template_tag"` //模板标签
|
|
|
|
SelectedColorIndex int `form:"selected_color_index"` //模板标签颜色索引
|
2023-10-25 05:12:00 +00:00
|
|
|
Logo string `form:"logo,optional"` //logo地址
|
2023-10-16 10:54:23 +00:00
|
|
|
}
|
2023-10-17 07:33:46 +00:00
|
|
|
type GetProductDetailRsp {
|
2023-10-25 05:06:19 +00:00
|
|
|
Logo string `json:"logo"` //logo
|
2023-10-16 10:54:23 +00:00
|
|
|
TemplateTagColorInfo TemplateTagColorInfo `json:"template_tag_color_info"` //标签颜色信息
|
2023-10-17 07:33:46 +00:00
|
|
|
ProductInfo ProductInfo `json:"product_info"` //产品基本信息
|
|
|
|
BaseColors interface{} `json:"base_colors"` //一些返回写死的颜色
|
|
|
|
SizeList []SizeInfo `json:"size_list"` //尺寸相关信息
|
|
|
|
}
|
|
|
|
type SizeInfo {
|
|
|
|
Id int64 `json:"id"` //尺寸id
|
2023-10-17 08:19:44 +00:00
|
|
|
IsDefault int64 `json:"is_default"` //是否默认显示
|
2023-10-17 07:33:46 +00:00
|
|
|
Title interface{} `json:"title"` //尺寸标题信息
|
|
|
|
Capacity string `json:"capacity"` //尺寸名称
|
|
|
|
PartsCanDeleted int64 `json:"parts_can_deleted"` //配件是否可删除
|
|
|
|
IsHot int64 `json:"is_hot"` //是否热门
|
|
|
|
MinPrice string `json:"min_price"` //最低价
|
|
|
|
TemplateInfo interface{} `json:"template_info"` //模板相关信息
|
|
|
|
ModelInfo ModelInfo `json:"model_info"` //模型相关信息
|
2023-10-17 07:56:48 +00:00
|
|
|
FittingList []FittingInfo `json:"fitting_list"` //配件相关信息
|
2023-10-17 07:33:46 +00:00
|
|
|
}
|
|
|
|
type FittingInfo {
|
|
|
|
Id int64 `json:"id"` //配件id
|
|
|
|
IsHot int64 `json:"is_hot"` //是否热门
|
|
|
|
MaterialImage string `json:"material_image"` //配件材质图
|
|
|
|
DesignInfo interface{} `json:"design_info"` //配件设计信息
|
|
|
|
Price string `json:"price"` //配件价格
|
|
|
|
Name string `json:"name"` //配件名
|
|
|
|
IsDefault int64 `json:"is_default"` //是否默认的配件
|
|
|
|
}
|
|
|
|
type ModelInfo {
|
|
|
|
Id int64 `json:"id"` //模型id
|
2023-10-16 10:54:23 +00:00
|
|
|
ModelDesignInfo interface{} `json:"design_info"` //模型设计信息
|
2023-10-17 07:33:46 +00:00
|
|
|
LightInfo LightInfo `json:"light_info"` //灯光信息
|
2023-10-16 10:54:23 +00:00
|
|
|
}
|
2023-10-17 07:33:46 +00:00
|
|
|
type LightInfo {
|
|
|
|
Id int64 `json:"id"` //灯光id
|
|
|
|
LightName string `json:"light_name"` //灯光组名称
|
2023-10-16 10:54:23 +00:00
|
|
|
LightDesignInfo interface{} `json:"light_design_info"` //灯光设计信息
|
|
|
|
}
|
2023-10-17 07:33:46 +00:00
|
|
|
type ProductInfo {
|
2023-11-01 08:58:26 +00:00
|
|
|
Id int64 `json:"id"` //产品id
|
|
|
|
Description string `json:"description"` //产品描述
|
|
|
|
ProductType int64 `json:"product_type"` //产品类型id
|
|
|
|
ProductTypeName string `json:"product_type_name"` //产品类型名称
|
|
|
|
Title string `json:"title"` //产品标题
|
|
|
|
IsEnv int64 `json:"is_env"` //是否环保
|
|
|
|
IsMicro int64 `json:"is_micro"` //是否可微波炉
|
|
|
|
IsCustomization int64 `json:"is_customization"` //是否可定制产品
|
|
|
|
WebsiteUnit interface{} `json:"website_unit"` //产品前台网站单位
|
2023-10-17 07:33:46 +00:00
|
|
|
}
|
|
|
|
type TemplateTagColorInfo {
|
|
|
|
Colors [][]string `json:"colors"` //传入logo对应的算法颜色组
|
|
|
|
SelectedColorIndex int `json:"selected_color_index"` //选择的模板标签的颜色索引值
|
|
|
|
TemplateTagGroups interface{} `json:"template_tag_groups"` //模板标签分组信息
|
2023-07-20 06:56:28 +00:00
|
|
|
}
|