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 {
|
|
|
|
//获取产品列表
|
|
|
|
@handler GetProductListHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
get /api/product/list(GetProductListReq) returns (response);
|
2023-07-11 09:08:19 +00:00
|
|
|
//获取支付成功后推荐产品
|
2023-06-19 02:34:21 +00:00
|
|
|
@handler GetSuccessRecommandHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
get /api/product/success-recommand (GetSuccessRecommandReq) returns (response);
|
2023-06-07 09:27:17 +00:00
|
|
|
//获取分类下的产品以及尺寸
|
2023-06-19 02:34:21 +00:00
|
|
|
@handler GetSizeByProductHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
get /api/product/get-size-by-product returns (response);
|
2023-06-19 04:23:02 +00:00
|
|
|
//获取保存的设计信息
|
2023-06-19 02:34:21 +00:00
|
|
|
@handler GetProductDesignHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
get /api/product/design(GetProductDesignReq) returns (response);
|
2023-06-30 09:20:11 +00:00
|
|
|
//产品设计数据采集
|
|
|
|
@handler DesignGatherHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
post /api/product/design-gather (DesignGatherReq) returns (response);
|
2023-07-03 09:57:41 +00:00
|
|
|
//获取产品信息
|
|
|
|
@handler GetProductInfoHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
get /api/product/info(GetProductInfoReq) returns (response);
|
2023-07-05 08:03:16 +00:00
|
|
|
//保存设计信息
|
|
|
|
@handler SaveDesignHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
post /api/product/save-design(SaveDesignReq) returns (response);
|
2023-07-10 11:42:55 +00:00
|
|
|
//其他产品推荐列表
|
|
|
|
@handler OtherProductListHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
get /api/product/other-list (OtherProductListReq) returns (response);
|
2023-07-11 09:08:19 +00:00
|
|
|
//获取详情页推荐产品列表
|
|
|
|
@handler GetRecommandProductListHandler
|
2023-07-12 03:09:43 +00:00
|
|
|
get /api/product/recommand (GetRecommandProductListReq) returns (response);
|
2023-07-13 11:05:13 +00:00
|
|
|
//获取分类产品列表
|
|
|
|
@handler GetTagProductListHandler
|
|
|
|
get /api/product/tag_product_list(GetTagProductListReq) returns (response);
|
2023-07-14 07:57:27 +00:00
|
|
|
//*********************产品详情分解接口开始***********************
|
|
|
|
//获取云渲染设计方案信息
|
|
|
|
@handler GetRenderDesignHandler
|
|
|
|
get /api/product/render_design(GetRenderDesignReq) returns (response);
|
2023-07-14 08:48:04 +00:00
|
|
|
//获取产品模型信息
|
|
|
|
@handler GetModelByPidHandler
|
|
|
|
get /api/product/get_model_by_pid(GetModelByPidReq) returns (response);
|
2023-07-14 07:57:27 +00:00
|
|
|
//*********************产品详情分解接口结束***********************
|
2023-06-07 09:27:17 +00:00
|
|
|
}
|
|
|
|
|
2023-06-05 03:27:01 +00:00
|
|
|
//获取产品列表
|
2023-06-01 07:32:28 +00:00
|
|
|
type GetProductListReq {
|
2023-06-02 11:24:58 +00:00
|
|
|
Cid int64 `form:"cid"`
|
2023-06-01 07:32:28 +00:00
|
|
|
Size uint32 `form:"size"`
|
2023-07-11 11:29:20 +00:00
|
|
|
Page uint32 `form:"page,optional"`
|
2023-07-10 09:54:43 +00:00
|
|
|
IsDemo uint32 `form:"is_demo,optional"`
|
2023-05-31 03:38:17 +00:00
|
|
|
}
|
2023-06-02 11:24:58 +00:00
|
|
|
type GetProductListRsp {
|
|
|
|
Ob Ob `json:"ob"`
|
|
|
|
TypeName string `json:"typeName"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
}
|
|
|
|
type Ob {
|
2023-06-29 03:43:07 +00:00
|
|
|
Items []Items `json:"items"`
|
|
|
|
Meta Meta `json:"_meta"`
|
2023-06-02 11:24:58 +00:00
|
|
|
}
|
|
|
|
type Items {
|
2023-07-10 10:32:54 +00:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
Intro string `json:"intro"`
|
|
|
|
CoverImg string `json:"cover_img"`
|
|
|
|
IsEnv int64 `json:"isEnv"`
|
|
|
|
IsMicro int64 `json:"isMicro"`
|
|
|
|
SizeNum uint32 `json:"sizeNum"`
|
|
|
|
MiniPrice int64 `json:"miniPrice"`
|
|
|
|
CoverDefault string `json:"coverDefault"`
|
2023-06-06 07:30:12 +00:00
|
|
|
}
|
2023-07-11 09:08:19 +00:00
|
|
|
//获取支付成功后推荐产品
|
2023-06-06 07:30:12 +00:00
|
|
|
type GetSuccessRecommandReq {
|
|
|
|
Num uint32 `form:"num"`
|
|
|
|
Size uint32 `form:"size"`
|
|
|
|
Sn string `form:"sn"`
|
|
|
|
}
|
|
|
|
type GetSuccessRecommandRsp {
|
|
|
|
Title string `json:"title"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
CoverImg string `json:"coverImg"`
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
SkuId int64 `json:"skuId"`
|
|
|
|
CoverDefault string `json:"coverDefault"`
|
2023-06-07 09:27:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//获取分类下的产品以及尺寸
|
|
|
|
type GetSizeByProductRsp {
|
2023-06-29 03:43:07 +00:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Children []Children `json:"children"`
|
2023-06-07 09:27:17 +00:00
|
|
|
}
|
|
|
|
type Children {
|
2023-06-29 03:43:07 +00:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Cycle int `json:"cycle"`
|
|
|
|
ChildrenList []ChildrenObj `json:"children"`
|
2023-06-07 09:27:17 +00:00
|
|
|
}
|
|
|
|
type ChildrenObj {
|
2023-06-29 03:43:07 +00:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
PriceList []PriceObj `json:"price_list"`
|
2023-06-07 09:27:17 +00:00
|
|
|
}
|
|
|
|
type PriceObj {
|
|
|
|
Num int `json:"num"`
|
|
|
|
Price float64 `json:"price"`
|
2023-06-19 04:23:02 +00:00
|
|
|
}
|
|
|
|
//获取保存的设计信息
|
|
|
|
type GetProductDesignReq {
|
2023-06-19 06:47:54 +00:00
|
|
|
Sn string `form:"sn"`
|
2023-06-19 04:23:02 +00:00
|
|
|
}
|
|
|
|
type GetProductDesignRsp {
|
2023-07-05 08:58:16 +00:00
|
|
|
ProductId int64 `json:"product_id"`
|
|
|
|
TemplateId int64 `json:"template_id"`
|
|
|
|
//MaterialId int64 `json:"material_id"`
|
2023-06-19 06:47:54 +00:00
|
|
|
SizeId int64 `json:"size_id"`
|
|
|
|
OptionalId int64 `json:"optional_id"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
Info string `json:"info"`
|
2023-06-30 09:20:11 +00:00
|
|
|
}
|
|
|
|
//产品设计数据采集
|
|
|
|
type DesignGatherReq {
|
|
|
|
Data string `json:"data"`
|
|
|
|
}
|
|
|
|
type DesignGatherRsp {
|
|
|
|
Sn string `json:"sn"`
|
2023-07-03 09:57:41 +00:00
|
|
|
}
|
|
|
|
//获取产品信息
|
2023-07-04 08:48:56 +00:00
|
|
|
type GetProductInfoReq {
|
|
|
|
Pid string `form:"pid"`
|
|
|
|
Size uint32 `form:"size"`
|
|
|
|
ClientNo string `form:"client_no"`
|
2023-07-06 09:43:07 +00:00
|
|
|
HaveCloudRendering bool `form:"haveCloudRendering,optional"`
|
2023-07-04 08:48:56 +00:00
|
|
|
}
|
|
|
|
type GetProductInfoRsp {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Type int64 `json:"type"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
IsEnv int64 `json:"isEnv"`
|
|
|
|
IsMicro int64 `json:"isMicro"`
|
|
|
|
TypeName string `json:"typeName"`
|
|
|
|
IsLowRendering bool `json:"is_low_rendering"`
|
|
|
|
IsRemoveBg bool `json:"is_remove_bg"`
|
|
|
|
Materials []MaterialItem `json:"materials"`
|
|
|
|
Sizes []SizeItem `json:"sizes"`
|
2023-07-06 09:43:07 +00:00
|
|
|
Templates interface{} `json:"templates"`
|
2023-07-12 03:46:46 +00:00
|
|
|
Prices interface{} `json:"prices"`
|
2023-07-04 08:48:56 +00:00
|
|
|
LastDesign interface{} `json:"last_design"`
|
|
|
|
RenderDesign interface{} `json:"render_design"`
|
2023-07-06 09:43:07 +00:00
|
|
|
Colors interface{} `json:"colors"`
|
2023-07-04 08:48:56 +00:00
|
|
|
}
|
|
|
|
type SizeItem {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Title SizeTitle `json:"title"`
|
|
|
|
Capacity string `json:"capacity"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
Sort int64 `json:"sort"`
|
|
|
|
PartsCanDeleted bool `json:"parts_can_deleted"`
|
|
|
|
}
|
|
|
|
type SizeTitle {
|
|
|
|
Cm string `json:"cm"`
|
|
|
|
Inch string `json:"inch"`
|
|
|
|
}
|
|
|
|
type MaterialItem {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Title string `json:"title"`
|
2023-07-05 08:03:16 +00:00
|
|
|
}
|
|
|
|
//保存设计信息
|
|
|
|
type SaveDesignReq {
|
|
|
|
Data string `json:"data"` //加密信息
|
|
|
|
}
|
|
|
|
type SaveDesignRsp {
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
}
|
|
|
|
//保存设计信息(解密结构体)
|
|
|
|
type SaveDesignReqRealStruct {
|
|
|
|
ProductId int64 `json:"product_id"`
|
|
|
|
SizeId int64 `json:"size_id"`
|
|
|
|
OptionalId int64 `json:"optional_id"`
|
|
|
|
TemplateId int64 `json:"template_id"`
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
Data DesignData `json:"data"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
PageGuid string `json:"pageGuid"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DesignData {
|
|
|
|
MainColor ColorFill `json:"MainColor"`
|
|
|
|
SecondaryColor ColorFill `json:"SecondaryColor"`
|
|
|
|
Logo DesignLogo `json:"Logo"`
|
|
|
|
Slogan DesignSlogan `json:"Slogan"`
|
|
|
|
QRcode DesignQRcode `json:"QRcode"`
|
|
|
|
Website DesignWebsite `json:"Website"`
|
|
|
|
Phone DesignPhone `json:"Phone"`
|
|
|
|
Address DesignAddress `json:"Address"`
|
|
|
|
}
|
|
|
|
type DesignAddress {
|
|
|
|
Text string `json:"text"`
|
|
|
|
IfShow bool `json:"ifShow"`
|
|
|
|
}
|
|
|
|
type DesignPhone {
|
|
|
|
Text string `json:"text"`
|
|
|
|
IfShow bool `json:"ifShow"`
|
|
|
|
}
|
|
|
|
type DesignWebsite {
|
|
|
|
Text string `json:"text"`
|
|
|
|
IfShow bool `json:"ifShow"`
|
|
|
|
}
|
|
|
|
type DesignQRcode {
|
|
|
|
Text string `json:"text"`
|
|
|
|
SvgPath string `json:"svgPath"`
|
|
|
|
IfShow bool `json:"ifShow"`
|
|
|
|
}
|
|
|
|
type DesignSlogan {
|
|
|
|
Text string `json:"text"`
|
|
|
|
IfShow bool `json:"ifShow"`
|
|
|
|
}
|
|
|
|
type DesignLogo {
|
|
|
|
Material string `json:"material"`
|
|
|
|
MaterialName string `json:"materialName"`
|
|
|
|
MaterialTime string `json:"materialTime"`
|
|
|
|
Fill string `json:"fill"`
|
|
|
|
FillName string `json:"fill_name"`
|
|
|
|
Colors []string `json:"colors"`
|
|
|
|
}
|
|
|
|
type ColorFill {
|
|
|
|
Fill string `json:"fill"`
|
2023-07-10 11:42:55 +00:00
|
|
|
}
|
|
|
|
//其他产品推荐列表
|
|
|
|
type OtherProductListReq {
|
2023-07-11 03:36:01 +00:00
|
|
|
Cid int64 `form:"cid"`
|
|
|
|
Num int64 `form:"num"`
|
|
|
|
Size uint32 `form:"size"`
|
2023-07-10 11:42:55 +00:00
|
|
|
}
|
|
|
|
type OtherProductListRsp {
|
2023-07-11 03:28:57 +00:00
|
|
|
Title string `json:"title"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
CoverImg string `json:"cover_img"`
|
|
|
|
CoverDefault string `json:"cover_default"`
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
SkuId int64 `json:"sku_id"`
|
2023-07-11 09:08:19 +00:00
|
|
|
}
|
|
|
|
//获取详情页推荐产品列表
|
|
|
|
type GetRecommandProductListReq {
|
|
|
|
Size uint32 `form:"size"`
|
|
|
|
Num int64 `form:"num"`
|
|
|
|
Sn string `form:"sn"`
|
|
|
|
}
|
|
|
|
type GetRecommandProductListRsp {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
TitleCn string `json:"title_cn"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
CoverImg string `json:"cover_img"`
|
|
|
|
CoverDefault string `json:"cover_default"`
|
|
|
|
Intro string `json:"intro"`
|
2023-07-13 11:05:13 +00:00
|
|
|
}
|
|
|
|
//获取分类产品列表
|
|
|
|
type GetTagProductListReq {
|
|
|
|
Cid int64 `form:"cid,optional"` //分类id
|
|
|
|
Size uint32 `form:"size,optional"` //尺寸
|
|
|
|
}
|
|
|
|
type GetTagProductListRsp {
|
2023-07-14 06:43:59 +00:00
|
|
|
TotalCategory int `json:"total_category"`
|
2023-07-14 06:07:23 +00:00
|
|
|
TagList []TagItem `json:"tag_list"`
|
2023-07-13 11:05:13 +00:00
|
|
|
}
|
|
|
|
type TagItem {
|
2023-07-14 04:25:02 +00:00
|
|
|
TypeName string `json:"type_name"`
|
2023-07-13 11:05:13 +00:00
|
|
|
TypeId int64 `json:"type_id"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
Level int64 `json:"level"`
|
2023-07-14 04:25:02 +00:00
|
|
|
LevelPrefix string `json:"level_prefix"`
|
|
|
|
Icon string `json:"icon"`
|
|
|
|
Sort int64 `json:"sort"`
|
2023-07-13 11:05:13 +00:00
|
|
|
TagProductList []TagProduct `json:"tag_product_list"`
|
2023-07-14 04:25:02 +00:00
|
|
|
ChildTagList []*TagItem `json:"child_tag_list"`
|
2023-07-13 11:05:13 +00:00
|
|
|
}
|
|
|
|
type TagProduct {
|
|
|
|
ProductId int64 `json:"product_id"`
|
|
|
|
Sn string `json:"sn"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Cover string `json:"cover"`
|
|
|
|
Intro string `json:"intro"`
|
|
|
|
CoverImg string `json:"cover_img"`
|
2023-07-14 06:43:59 +00:00
|
|
|
IsEnv int64 `json:"is_env"`
|
|
|
|
IsMicro int64 `json:"is_micro"`
|
|
|
|
SizeNum uint32 `json:"size_num"`
|
|
|
|
MiniPrice int64 `json:"mini_price"`
|
|
|
|
CoverDefault string `json:"cover_default"`
|
2023-07-14 07:57:27 +00:00
|
|
|
}
|
|
|
|
//获取云渲染设计方案信息
|
|
|
|
type GetRenderDesignReq {
|
|
|
|
Sn string `form:"sn"`
|
|
|
|
}
|
|
|
|
type GetRenderDesignRsp {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Info interface{} `json:"info"`
|
|
|
|
OptionalId int64 `json:"optional_id"`
|
|
|
|
SizeId int64 `json:"size_id"`
|
|
|
|
TemplateId int64 `json:"template_id"`
|
|
|
|
LogoColor []string `json:"logo_color"`
|
2023-07-14 08:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//获取产品模型信息
|
|
|
|
type GetModelByPidReq {
|
|
|
|
Pid string `form:"pid"` //实际上是产品sn
|
2023-05-31 03:38:17 +00:00
|
|
|
}
|